activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mjparme <mjparme...@west.com>
Subject Re: Correlation ID for request/response
Date Thu, 17 May 2007 14:16:28 GMT



On 5/17/07, mjparme <mjparmeley@west.com> wrote:
>
> When you are using JMS for request/response and you set the correlation ID
> on
> the message does this ID have to be unique for the lifetime of the
> well-known queue you are sending to or does it only have to be unique for
> the messages currently in the queue?

It can be any ID at all; whether unique or not. e.g. you could recycle
the same ID after each conversation terminates if you like; so it only
needs to be unique among the currently active conversations. Often a
client creates it to correlate responses on a temporary queue; so it
can be unique within a single JVM in some circumstances.

Ahh ok, that makes sense.  The correlation ID is only there so the client
that sent the request knows which response matches which request (assuming
the client sends multiple requests at a time). The "server side" (i.e. the
consumer of of the well-known queue) doesn't care about the correlation ID
it just needs to make sure to send back the correlation ID it received (and
I do) so the client can correlate responses to requests...see this all makes
perfect sense I just had to talk it out:-)

Thanks!

-- 
View this message in context: http://www.nabble.com/Correlation-ID-for-request-response-tf3772033s2354.html#a10665025
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message