[rabbitmq-discuss] channel.txCommit() gets hung/blocks
matthew at rabbitmq.com
Thu Oct 20 08:43:19 BST 2011
On Wed, Oct 19, 2011 at 05:55:34PM -0700, Praveen M wrote:
> I started using transacted channels. I had set my channels with
> In the consumer that I defined (please see code below) , whenever my code
> reaches the point where this.getChannel().txCommit() the thread just hangs
> and doesn't move forward. I'm using a rabbit server and client (java) of
> 2.6.1 version.
You can't do any blocking call from the delivery callback - you're
already in the connection thread and it's not re-entrant so you can't
make a call from there. Please use something like the QueuingConsumer
which safely gets deliveries into a different thread, from where you can
safely make calls on the channel.
More information about the rabbitmq-discuss