activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bravegag <>
Subject blocking request-response with JMS and constant size limit strategy
Date Mon, 19 Oct 2009 18:57:33 GMT


I implemented a request-response project that runs on top of ActiveMQ. I
used the following code as starting point:

The problem here is that my request-response has to be blocking i.e. the
producer has to block itself until the consumer has confirmed processing the
request. I was specifically asked for this as requirement (University course

It works so far so good. The problem though, is that we have to fix the size
of the queues and present a limitting strategy. I chose the constant size
limit strategy where older messages are discarded away. Now this leads to
some of my consumers blocked waiting forever.

I have two solutions here:
1-. Timeout the client e.g. 4 seconds and it will retry the same request but
this solution trashes the benchmarks.
2-. Find a possible strategy to let the producer know that the request it
sent and is waiting for has been discarded. What would this strategy be? How
can I do this using JMS/ActiveMQ?

Many thanks in advance,
Best regards,
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message