You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Justin Rao <ju...@gmail.com> on 2009/09/24 03:02:28 UTC

Re: Stomp clients and message-id

Currently I have the same issue. I am using the STOMP Java client contained
in the ActiveMQ 5.3 package. I haven't figure out a solution. Does any one
know a work around to this problem?

One solution I could think about is that stomp client has to generate its
own unique correlation and put in the request message and to be contained as
a correlation id in the reply message. But it's not a very beautiful
solution.



Eric Sammer wrote:
> 
> Hello:
> 
> I'm working in a situation where I have Stomp clients (perl, using
> Net::Stomp) connecting to ActiveMQ (4.1.1, java 1.5.x on Linux). I need
> to use the standard request / response pattern with the reply-to,
> message-id, and correlation-id headers. The problem I find is that the
> message-id field isn't populated in the message object after send(). The
> JMS spec states the following:
> 
> "When a message is sent, JMSMessageID is ignored. When the send method
> returns, the field contains a provider-assigned value."
> 
> (Section 3.4.3, paragraph 2 of the JMS specification version 1.1 April
> 2002)
> 
> The problem is that the Stomp protocol doesn't seem to support a
> response to the SEND message that would allow the API to return the
> provider assigned message-id[1]. There is a provision for the RECEIPT
> frame, but it seems to only return the receipt-id field, as specified by
> the client; a kind of echo response confirmation which isn't rich
> enough, in this case.
> 
> This seems like an oversight in the Stomp protocol, more so than
> ActiveMQ. Am I reading this correctly? Should the message-id field of
> the sent message be populated after invocation of the send method (in
> whatever form it takes)? Should this be addressed with the AMQ team or
> with the Stomp protocol team?
> 
> Any thoughts or opinions are appreciated.
> Thanks in advance!
> 
> [1] - The Stomp Protocol - http://stomp.codehaus.org/Protocol
> -- 
> Eric Sammer
> System Architect
> CheetahMail, an Experian Company
> +1.212.863.4642 - esammer@cheetahmail.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Stomp-clients-and-message-id-tp14806914p25531342.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Stomp clients and message-id

Posted by Justin Rao <ju...@gmail.com>.
Thanks Roger!

The thread does demonstrate a request / response pattern implementation. It
can correlate requests sent by a client to a server and the replies from the
server. 

However, in some case, we'll need not only correlate requests and replies,
but also correlate a individual request and the individual corresponding
response. In this case, the response message may need to carry a correlation
ID, so the requester can correlate it with the request associated with this
ID.

Usually this ID is the request message's message ID. But if the requester
using STOMP. then it cannot get the server generated unique message ID and
thus cannot use this approach.

I think it's a limitation of STOMP protocol. I don't find a place it defines
any method for the sender to get the "message-id" header from a sent
message, though the message does carry it to the receiver.



Roger Hoover wrote:
> 
> This thread might help.
> http://www.nabble.com/PERL-STOMP%3A-How-to-Request-Response-td25323954.html#a25351243
> 
> On Wed, Sep 23, 2009 at 6:02 PM, Justin Rao <ju...@gmail.com> wrote:
> 
>>
>> Currently I have the same issue. I am using the STOMP Java client
>> contained
>> in the ActiveMQ 5.3 package. I haven't figure out a solution. Does any
>> one
>> know a work around to this problem?
>>
>> One solution I could think about is that stomp client has to generate its
>> own unique correlation and put in the request message and to be contained
>> as
>> a correlation id in the reply message. But it's not a very beautiful
>> solution.
>>
>>
>>
>> Eric Sammer wrote:
>> >
>> > Hello:
>> >
>> > I'm working in a situation where I have Stomp clients (perl, using
>> > Net::Stomp) connecting to ActiveMQ (4.1.1, java 1.5.x on Linux). I need
>> > to use the standard request / response pattern with the reply-to,
>> > message-id, and correlation-id headers. The problem I find is that the
>> > message-id field isn't populated in the message object after send().
>> The
>> > JMS spec states the following:
>> >
>> > "When a message is sent, JMSMessageID is ignored. When the send method
>> > returns, the field contains a provider-assigned value."
>> >
>> > (Section 3.4.3, paragraph 2 of the JMS specification version 1.1 April
>> > 2002)
>> >
>> > The problem is that the Stomp protocol doesn't seem to support a
>> > response to the SEND message that would allow the API to return the
>> > provider assigned message-id[1]. There is a provision for the RECEIPT
>> > frame, but it seems to only return the receipt-id field, as specified
>> by
>> > the client; a kind of echo response confirmation which isn't rich
>> > enough, in this case.
>> >
>> > This seems like an oversight in the Stomp protocol, more so than
>> > ActiveMQ. Am I reading this correctly? Should the message-id field of
>> > the sent message be populated after invocation of the send method (in
>> > whatever form it takes)? Should this be addressed with the AMQ team or
>> > with the Stomp protocol team?
>> >
>> > Any thoughts or opinions are appreciated.
>> > Thanks in advance!
>> >
>> > [1] - The Stomp Protocol - http://stomp.codehaus.org/Protocol
>> > --
>> > Eric Sammer
>> > System Architect
>> > CheetahMail, an Experian Company
>> > +1.212.863.4642 - esammer@cheetahmail.com
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Stomp-clients-and-message-id-tp14806914p25531342.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Stomp-clients-and-message-id-tp14806914p25605173.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Stomp clients and message-id

Posted by Roger Hoover <ro...@gmail.com>.
This thread might help.
http://www.nabble.com/PERL-STOMP%3A-How-to-Request-Response-td25323954.html#a25351243

On Wed, Sep 23, 2009 at 6:02 PM, Justin Rao <ju...@gmail.com> wrote:

>
> Currently I have the same issue. I am using the STOMP Java client contained
> in the ActiveMQ 5.3 package. I haven't figure out a solution. Does any one
> know a work around to this problem?
>
> One solution I could think about is that stomp client has to generate its
> own unique correlation and put in the request message and to be contained
> as
> a correlation id in the reply message. But it's not a very beautiful
> solution.
>
>
>
> Eric Sammer wrote:
> >
> > Hello:
> >
> > I'm working in a situation where I have Stomp clients (perl, using
> > Net::Stomp) connecting to ActiveMQ (4.1.1, java 1.5.x on Linux). I need
> > to use the standard request / response pattern with the reply-to,
> > message-id, and correlation-id headers. The problem I find is that the
> > message-id field isn't populated in the message object after send(). The
> > JMS spec states the following:
> >
> > "When a message is sent, JMSMessageID is ignored. When the send method
> > returns, the field contains a provider-assigned value."
> >
> > (Section 3.4.3, paragraph 2 of the JMS specification version 1.1 April
> > 2002)
> >
> > The problem is that the Stomp protocol doesn't seem to support a
> > response to the SEND message that would allow the API to return the
> > provider assigned message-id[1]. There is a provision for the RECEIPT
> > frame, but it seems to only return the receipt-id field, as specified by
> > the client; a kind of echo response confirmation which isn't rich
> > enough, in this case.
> >
> > This seems like an oversight in the Stomp protocol, more so than
> > ActiveMQ. Am I reading this correctly? Should the message-id field of
> > the sent message be populated after invocation of the send method (in
> > whatever form it takes)? Should this be addressed with the AMQ team or
> > with the Stomp protocol team?
> >
> > Any thoughts or opinions are appreciated.
> > Thanks in advance!
> >
> > [1] - The Stomp Protocol - http://stomp.codehaus.org/Protocol
> > --
> > Eric Sammer
> > System Architect
> > CheetahMail, an Experian Company
> > +1.212.863.4642 - esammer@cheetahmail.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Stomp-clients-and-message-id-tp14806914p25531342.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>