[rabbitmq-discuss] Is it safe to interrupt nextDelivery() ?
philippe.blayo at gmail.com
Wed Nov 3 15:12:37 GMT 2010
For our fitnesse tests, we have a thread that consumes messages and is
interrupted after a time out. It is interrupted most of the time in
the blocking call to QueuingConsummer.nextDelivery(). We observe that
there is a pending message that is not taken and not acknowledged :
$ rabbitmqctl list_queues name messages_ready messages_unacknowledged
Listing queues ...
STAT_PRINCIPALE 1 1
Our consumer receive an InterruptedException via
ExecutorService.shutdownNow() in queue.take() in the QueuingConsummer.
We reuse channels on the same connection but not on two concurrent
threads at a time.
Is there a better way to close the QueuingConsummer.nextDelivery() ?
Philippe Blayo & Bruno Thomas
More information about the rabbitmq-discuss