The JMSMessageID header field contains a value that uniquely identifies each message sent by a provider.
When a message is sent, JMSMessageID can be ignored. When the Send or Publish method returns, it contains a provider-assigned value.
A JMSMessageID is a String value that should function as a unique key for identifying messages in a historical repository. The exact scope of uniqueness is provider-defined. It should at least cover all messages for a specific installation of a provider, where an installation is some connected set of message routers.
All JMSMessageID values must Start with the prefix 'ID:'. Uniqueness of message ID values across different providers is not required.
Since message IDs take some effort to create and increase a message's size, some JMS providers may be able to optimize message overhead if they are given a hint that the message ID is not used by an application. By calling the IMessageProducer.setDisableMessageID method, a JMS client enables this potential optimization for all messages sent by that message producer. If the JMS provider accepts this hint, these messages must have the message ID set to null; if the provider ignores the hint, the message ID must be set to its normal unique value.
| Exception Type | Condition |
|---|---|
| MessageException | if the JMS provider fails to get the message ID due to some internal error. |
IMessage Interface | WebLogic.Messaging Namespace