You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sagi Mann <sa...@gmail.com> on 2006/12/28 14:21:35 UTC

Reliable request/response

Hi,
>From the reliability discussions of JMS, I was still unable to figure out
how to implement the following using ActiveMQ:

A client (producer) simultaneously instructs 10 servers (consumers) to
perform some work by sending a message to each server's message queue. Now,
the client needs some sort of confirmation: either a certain server
completed the work -OR- some message did not reach the server and expired.
Needsless to say these confirmations are handled asynchronously.

Does JMS/ActiveMQ provide some acknowledgement of these events? (afaik,
session acknowledgement mode does not reach the sender). I know I can
implement some temp queue for the replies, but that won't notify me of
expired messages!

thanks...
-- 
View this message in context: http://www.nabble.com/Reliable-request-response-tf2890291.html#a8074603
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Reliable request/response

Posted by Sagi Mann <sa...@gmail.com>.
The ACK cannot be "caught" by the original sender just as expired messages
can't. So basically, there is no way for the sender to be notifed after the
receiver has processed the message (other than implementing some temp reply
queue), correct? And about the expired messages: if what you say is true,
then what is AdvisorySupport.getExpiredQueueMessageAdvisoryTopic for?

Thanks,


James.Strachan wrote:
> 
> Get the consumers to send an acknowledgement when they have processed
> the messages. You can then monitor the queue depth to monitor if
> consumers/servers are not running correctly.
> 
> If you are using messages which expire if they are not processed
> within some time period, we were hoping to have timed out messages
> sent to a dead letter queue which you could consume from but I don't
> think thats properly implemented just yet.
> 
> On 12/28/06, Sagi Mann <sa...@gmail.com> wrote:
>>
>> Hi,
>> From the reliability discussions of JMS, I was still unable to figure out
>> how to implement the following using ActiveMQ:
>>
>> A client (producer) simultaneously instructs 10 servers (consumers) to
>> perform some work by sending a message to each server's message queue.
>> Now,
>> the client needs some sort of confirmation: either a certain server
>> completed the work -OR- some message did not reach the server and
>> expired.
>> Needsless to say these confirmations are handled asynchronously.
>>
>> Does JMS/ActiveMQ provide some acknowledgement of these events? (afaik,
>> session acknowledgement mode does not reach the sender). I know I can
>> implement some temp queue for the replies, but that won't notify me of
>> expired messages!
>>
>> thanks...
>> --
>> View this message in context:
>> http://www.nabble.com/Reliable-request-response-tf2890291.html#a8074603
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Reliable-request-response-tf2890291.html#a8126632
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Reliable request/response

Posted by James Strachan <ja...@gmail.com>.
Get the consumers to send an acknowledgement when they have processed
the messages. You can then monitor the queue depth to monitor if
consumers/servers are not running correctly.

If you are using messages which expire if they are not processed
within some time period, we were hoping to have timed out messages
sent to a dead letter queue which you could consume from but I don't
think thats properly implemented just yet.

On 12/28/06, Sagi Mann <sa...@gmail.com> wrote:
>
> Hi,
> From the reliability discussions of JMS, I was still unable to figure out
> how to implement the following using ActiveMQ:
>
> A client (producer) simultaneously instructs 10 servers (consumers) to
> perform some work by sending a message to each server's message queue. Now,
> the client needs some sort of confirmation: either a certain server
> completed the work -OR- some message did not reach the server and expired.
> Needsless to say these confirmations are handled asynchronously.
>
> Does JMS/ActiveMQ provide some acknowledgement of these events? (afaik,
> session acknowledgement mode does not reach the sender). I know I can
> implement some temp queue for the replies, but that won't notify me of
> expired messages!
>
> thanks...
> --
> View this message in context: http://www.nabble.com/Reliable-request-response-tf2890291.html#a8074603
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: Reliable request/response

Posted by Sagi Mann <sa...@gmail.com>.
Hi, I can't seem to catch any expiration messages.
I've done as the URL suggested:
Destination q = session.createQueue("my.queue");
Destination exp =
AdvisorySupport.getExpiredQueueMessageAdvisoryTopic((ActiveMQDestination)q);
MessageConsumer c = session.createConsumer(exp);
c.setMessageListener(this); // my onMessage method simply outputs the
message

My producer sends a message (TTL=5000) from a different session, and I
expected the consumer above to "catch" the expiration notice, but it
doesn't.. Using jconsole, I can see my message arriving at the queue and
stay there (shouldn't it be removed after expiration?).

Am I doing anything wrong?
Thanks,

Marlon Santos wrote:
> 
> Hi,
> 
> Using  http://activemq.org/site/advisory-message.html Advisory Messages 
> can be of great help...
> 
> Regards,
> Marlon
> 
> 
> 
> Sagi Mann wrote:
>> 
>> Hi,
>> From the reliability discussions of JMS, I was still unable to figure out
>> how to implement the following using ActiveMQ:
>> 
>> A client (producer) simultaneously instructs 10 servers (consumers) to
>> perform some work by sending a message to each server's message queue.
>> Now, the client needs some sort of confirmation: either a certain server
>> completed the work -OR- some message did not reach the server and
>> expired. Needsless to say these confirmations are handled asynchronously.
>> 
>> Does JMS/ActiveMQ provide some acknowledgement of these events? (afaik,
>> session acknowledgement mode does not reach the sender). I know I can
>> implement some temp queue for the replies, but that won't notify me of
>> expired messages!
>> 
>> thanks...
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Reliable-request-response-tf2890291.html#a8126393
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Reliable request/response

Posted by Marlon Santos <ms...@exist.com>.
Hi,

Using  http://activemq.org/site/advisory-message.html Advisory Messages  can
be of great help...

Regards,
Marlon



Sagi Mann wrote:
> 
> Hi,
> From the reliability discussions of JMS, I was still unable to figure out
> how to implement the following using ActiveMQ:
> 
> A client (producer) simultaneously instructs 10 servers (consumers) to
> perform some work by sending a message to each server's message queue.
> Now, the client needs some sort of confirmation: either a certain server
> completed the work -OR- some message did not reach the server and expired.
> Needsless to say these confirmations are handled asynchronously.
> 
> Does JMS/ActiveMQ provide some acknowledgement of these events? (afaik,
> session acknowledgement mode does not reach the sender). I know I can
> implement some temp queue for the replies, but that won't notify me of
> expired messages!
> 
> thanks...
> 

-- 
View this message in context: http://www.nabble.com/Reliable-request-response-tf2890291.html#a8083206
Sent from the ActiveMQ - User mailing list archive at Nabble.com.