[rabbitmq-discuss] sub-request a message using a message batch
Matthew Sackman
matthew at lshift.net
Fri Apr 2 16:14:45 BST 2010
Hi Jon,
Sorry for the slow reply.
On Tue, Mar 23, 2010 at 08:19:28AM -0500, Jon Brisbin wrote:
> When I'm in my handleDelivery() method of my batch message listener, it seems I can't create a new, anonymous queue which I can listen to for the results of this "sub-request", which I will grab, put into a new zip file, and send back to the requestor, along with the results from all their other requests.
You're deadlocking here because you're in the main loop thread already.
You need to get out of that thread - if you use our QueueingConsumer class
rather than DefaultConsumer and then call nextDelivery() from your own
thread you will pick up the next message in your own thread and then find
that you can make subsequent calls back to Rabbit.
I hope that makes some sense.
Matthew
More information about the rabbitmq-discuss
mailing list