-
1. Re: message-id STOMP
gaohoward Dec 12, 2011 8:23 AM (in response to cvasilak)Did you try getting "correlation-id" header from the stomp frame?
Howard
-
2. Re: message-id STOMP
cvasilak Dec 12, 2011 10:57 AM (in response to gaohoward)Hi Howard,
On the producer I *don't* set "setJMSCorrelationID" on the message. Only in the consumer, in my case the C client I set it to the JMSMessageID (in STOMP frame I thought it was the "message-id" header of the received message)
An excerpt from the C client but you can get the idea.
replyframe is the STOMP reply frame
reqframe is the STOMP request frame e.g. message received from server
apr_hash_set(replyframe.headers, "correlation-id", APR_HASH_KEY_STRING, apr_hash_get(reqframe->headers, "message-id", APR_HASH_KEY_STRING)); But the "message-id" differs from "JMSMessageID" of the message sent.
The way I solved is
On the producer I set the
message.setStringPoperty("UIID", java.util.UIID);
and replacing the C code with
apr_hash_set(replyframe.headers, "correlation-id", APR_HASH_KEY_STRING, apr_hash_get(reqframe->headers, "UIID", APR_HASH_KEY_STRING));
But why the mismach on the message-id and the JMSMessageID on the received STOMP frame. Why they are not equal?
Am i missing sth?
Thanks
-
3. Re: message-id STOMP
gaohoward Dec 12, 2011 10:00 PM (in response to cvasilak)Hi,
"JMSMessageID" is not mapped to "message-id" in HornetQ stomp frames. "message-id" corresponds to the internal long type id for the message.
Currently hornetq doesn't try to copy "JMSMessageID" to the stomp frames so you can't get it from the received frames.
Howard
-
4. Re: message-id STOMP
cvasilak Dec 13, 2011 5:17 AM (in response to gaohoward)Thanks Howard for your reply
Regards