activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Correlation ID for request/response
Date Thu, 17 May 2007 14:23:59 GMT
On 5/17/07, mjparme <> wrote:
> On 5/17/07, mjparme <> 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...

Bingo! :)

> see this all makes
> perfect sense I just had to talk it out:-)


I've tried to describe it here....

by all means edit that wiki page if you think it could be more clear etc.


View raw message