You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by NizarK <ni...@lycos.com> on 2008/06/07 09:07:20 UTC

Request/ Response Pattern

Hi ! 
I have a problem with implementing Request /response Pattern with JMS ...
I have one queue on wich many object instances make request/response
operations ..
The problem is how a requester , when retrieving a response from the queue ,
can only get from the queue the response with the right CorrelationID and
leave all the others in the queue ...
I Tried with setting ack mode to CLIENT.ACKNOWLEDGE but when i do a
msg.acknowledge() , all the messages consumed in the session are retrieved
and the queue becomes empty ...
Any solutions please ???
-- 
View this message in context: http://www.nabble.com/Request--Response-Pattern-tp17706032s2354p17706032.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Request/ Response Pattern

Posted by Richard Gillingham <ri...@richardgillingham.com>.

Hello there,

Isn't this the wrong pattern??  Have you tried setting up a response queue
for each requester and putting it's names in the reply-to field of the JMS
message.  You wouldn't need to use correlation IDs for message filtering
then, just for matching the response to the request.

Kind regards

Richard


NizarK wrote:
> 
> Hi ! 
> I have a problem with implementing Request /response Pattern with JMS ...
> I have one queue on wich many object instances make request/response
> operations ..
> The problem is how a requester , when retrieving a response from the queue
> , can only get from the queue the response with the right CorrelationID
> and leave all the others in the queue ...
> I Tried with setting ack mode to CLIENT.ACKNOWLEDGE but when i do a
> msg.acknowledge() , all the messages consumed in the session are retrieved
> and the queue becomes empty ...
> Any solutions please ???
> 

-- 
View this message in context: http://www.nabble.com/Request--Response-Pattern-tp17706032s2354p17716112.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.