activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From radisb <>
Subject Prefetch and redelivery status
Date Thu, 29 Jan 2009 17:56:43 GMT

I have a problem. 
How can I have the redelevery status of a message based not on if the broker
has sent a message to the consumer, but on if the consumer has called
receive on that message. 
One way might be setting prefetch size to 0, so the receive is 1 to 1 with
the broker filling the consumer.
But if I have prefetch size of 50 and at some point i want to close my
application then I am doomed to have messages with redelivered status true
even if i have not pulled them from my consumer them by calling receive(). I
know that I cannot set the prefetch size on the fly. That would solve the
problem because when i would want to close my client, i would set prefetch
to 0, and process the remaining messages waitng in the consumers prefetch
queue, then shutdown the client. Is there any way to do it? 

Thanks in advance,

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message