[rabbitmq-discuss] unsynchronized access to com.rabbitmq.client.impl.AMQChannel#_blockContent in java client
mabrek
mabrek at gmail.com
Thu Sep 23 09:40:19 BST 2010
Hello,
I use Channel.basicPublish() in http request handler (java client 2.1.0).
Messages should be sent immediately or exception should be thrown after rabbitmq server had sent channel.flow active=false. If I don't handle channel.flow status, basicPublish() will hang until server sends channel.flow active=true.
I'm trying to check channel flow status before sending messages. It seems that the proper way to do it is to check channel.getFlow().getActive() but com.rabbitmq.client.impl.ChannelN#getFlow uses unsynchronized access to field _blockContent. Access to _blockContent is protected by synchronized (_channelMutex) in all other places.
Regards,
Anton Lebedevich.
More information about the rabbitmq-discuss
mailing list