[jboss-user] [JBoss Messaging] - Re: JMSMessageID in Messaging cluster
aslak
do-not-reply at jboss.com
Tue Sep 11 18:04:27 EDT 2007
As far as the JMS 1.1 Specification goes on the topic:
----------------------------
3.4.3 JMSMessageID
The JMSMessageID header field contains a value that uniquely identifies each
message sent by a provider.
...
A JMSMessageID is a String value which 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.
...
3.4.5 JMSCorrelationID
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.
...
Since each message sent by a JMS provider is assigned a message ID value, it is
convenient to link messages via message ID.
...
In some cases, an application (made up of several clients) needs to use an
application-specific value for linking messages.
...
----------------------------
I'm not 100% sure, but I think the text 'a specific installation of a provider where an installation is some connected set of message routers'
could be hinting at a cluster?
The specification is clear that a MessageID is suppose to uniquely identify a Message. By changing the MessageID
it no longer identifies the original Message. It now identifies a new Message, unknown to the sender.
Common Practice...
The two common correlation patterns are:
- Correlation ID Pattern
The receiver copies the request Correlation ID to the response Correlation ID.
- Message ID Pattern
The receiver copies the request Message ID to the response Correlation ID.
I think it would be wrong of the JMS provider to force the use of one over the other.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083201#4083201
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083201
More information about the jboss-user
mailing list