[rabbitmq-discuss] Question on Java Client

Matthias Radestock matthias at rabbitmq.com
Thu Mar 17 07:17:39 GMT 2011

Deven Phillips wrote:
> the call to channel.basicPublish() hangs.... It appears to be
> blocking while waiting on a response, but using a traffic sniffer, I
> see that the response has been received already.

publishing is asynchronous - there is no response. Are you sure the 
program is actually blocked in that part of the code?

You are not closing the connection at the end. Since connections have a 
(non-daemon) thread backing them, the program will not exit while the 
connection is still alive. I suspect that's what it is happening here.



More information about the rabbitmq-discuss mailing list