[rabbitmq-discuss] Java API methods don't return nor throw exceptions

Matthias Radestock matthias at lshift.net
Sat Dec 13 03:28:25 GMT 2008


Jonatan,

Jonatan Kallus wrote:
> Thank you!, the key combo is ctrl+\ and this is what I get. I do not 
> really understand this, so I am very thankful for anything that makes me 
> understand it a little further. I few other threads are running in the 
> application, but they have no interaction with rabbitmq so I wont paste 
> them here, unless they are needed.
> 
> This is when execution stops at basicCancel:

The code is calling basicCancel from inside a handleDelivery method. The 
latter is called in the context of the Connection's receive loop thread. 
Since basicCancel is synchronous the code thus ends up blocking the 
receive loop.

Only asynchronous methods are safe to call inside handleDelivery. To 
call a synchronous method you'd have to signal another thread and make 
the call from there (and taking care to not use the channel from more 
than one thread simultaneously).


Matthias.




More information about the rabbitmq-discuss mailing list