[rabbitmq-discuss] Implementing an RPC backend

Ben Hood 0x6e6562 at gmail.com
Sun Jul 8 10:13:16 BST 2007


Matthias,


> I suspect that in the 1.0.0-alpha client the above results in a
> deadlock. A thread dump should tell you whether that is the case.
>
> One way to get around the deadlock is to let handleDelivery push
> requests onto a Java queue, and process that from a different
> thread.

OK, I'll have a look.

I debugged the route method in rabbit_exchange, which does a mnesia
lookup of the replyTo routing key:

Handlers = case rabbit_misc:clean_read({binding, BindingKey}) of
		   {error, not_found} ->
		       handlers_for_missing_binding_record(X, RoutingKey);
		   {ok, #binding{handlers = H}} ->
		       H
	       end,

This returns [], so it seems to be at that point that the message is
unroutable. I found this last night, so I'll have a look to see what
the contents of the binding table in mnesia is. I tried initially with
TV, but it's difficult to see the actual content with that. I'll try
using the API.

> The next version of the client API has a QueuingConsumer class
> for that purpose, and is generally less prone to deadlocks.

Is any of this code available in a repository?

Thanks,

Ben




More information about the rabbitmq-discuss mailing list