activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: correlation ID on synchronous message
Date Thu, 08 Jul 2010 12:20:46 GMT
The correlation Id is useful when a reply queue is shared by processes
or by producers/consumers concurrently and the replies come back out
of order.
Typically, a queue is used to decouple 'requests for work' from 'work'
so the order of 'work' completion is not deterministic, hence the need
for a correlationId. If all requests are serialized as in an RPC style
interaction there is no need for the correlation id, but then why use
a MOM at all.

There is some more detail at
http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html

On 8 July 2010 11:32, sic <sic_1234@naver.com> wrote:
>
> I give thought to the correlation ID concept on the JMS Specification.
>
> When using synchronous queue messages, we should have JMSReplyTo header
> which has a destination of the producer.
>
> After sending, the producer waits for reply message to reach its temporary
> queue.
>
> In this format, it is only the consumer of that message that can send the
> reply message by JMSReplyTo header.
>
> So it's fine without correlation ID because the producer waits for reply
> message not on the static queue but on the temporary queue registered in the
> JMSReplyTo header.
>
> And that's all in my thought.
>
> Then, What's the purposes for using the correlation ID?
>
> I have heard that using this is for relating sending message to its reply
> message.
>
> But it doesn't need to relate between them unless we using it in the
> application layer.
>
> Although it's not about activemq, I try asking because I can't find any
> appropriate forum for that issue.
>
> I hope anybody informs me of this concept.
>
> regards,
>
> sic
> --
> View this message in context: http://old.nabble.com/correlation-ID-on-synchronous-message-tp29105526p29105526.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Mime
View raw message