WebLogic Messaging API Class Library

IMessage.JMSCorrelationID Property

Gets and Sets the correlation ID for the message.

A client can use the JMSCorrelationID header field to link one message with another. A typical use is to link a response message with its request message.

JMSCorrelationID can hold one of the following:

Since each message sent by a JMS provider is assigned a message ID value, it is convenient to link messages via message ID. All message ID values must Start with the 'ID:' prefix.

In some cases, an application (made up of several clients) needs to use an application-specific value for linking messages. For instance, an application may use JMSCorrelationID to hold a value referencing some external information. Application-specified values must not Start with the 'ID:' prefix; this is reserved for provider-generated message ID values.

If a provider supports the native concept of correlation ID, a JMS client may need to assign specific JMSCorrelationID values to match those expected by clients that do not use the JMS API. A byte[] value is used for this purpose. JMS providers without native correlation ID values are not required to support byte[] values. The use of a byte[] value for JMSCorrelationID is non-portable.

 JMSCorrelationID {get; set;}

Exceptions

Exception TypeCondition
MessageExceptionif the JMS provider fails to set the correlation ID due to some internal error.

See Also

IMessage Interface | WebLogic.Messaging Namespace | JMSCorrelationIDAsBytes