[rabbitmq-discuss] RMQ Java Client - ChannelN.waitForConfirm randomly throwing exceptions

Steve Powell steve at rabbitmq.com
Wed Mar 28 18:17:57 BST 2012


There should be no need to use AtomicInteger to guarantee a new channel
number; createChannel should guarantee this for you.

You have shown me the stack trace -- and I can see that your application
threads are issuing waitForConfirms().

Can you tell me a little more about how your threads use the Channel?
I'd like to know the state of the channel the thread is using, at the
time of the call. What happened on that channel immediately before the
waitForConfirms() call?

Perhaps some more snippets of the thread code would be useful, and a
little more of the stack trace would help.

Finally, was there anything in the rabbit log around this time?

Steve Powell  (a happy bunny)
----------some more definitions from the SPD----------
chinchilla (n.) Cooling device for the lower jaw.
socialcast (n.) Someone to whom everyone is speaking but nobody likes.
literacy (n.) A textually transmitted disease usually contracted in childhood.

On 28 Mar 2012, at 17:29, Emanuele Gheradini wrote:

> I want also to add that what I understood is:
> for some reasons RabbitMQ java client gives the same channel (or channel
> number) to different threads, then these threads will perform different
> operations on that channel which will be closed by RabbitMQjavaclient, thus
> resulting in the crash of the waitForConfirm method, at line 182 (here is
> the snipped):
> 181: if (getCloseReason() != null) {
> 182:                  throw Utility.fixStackTrace(getCloseReason());
> 183:               }
> I tried getting channels from rabbit in this way:
> AtomicInteger chanNumber = new AtomicInteger(0);
> connection.createChannel(chanNumber.getAndIncrement());
> to be sure that each thread gets a channel with a different channelNumber,
> but this does not work either...
> I hope someone can give me a suggestion.
> Thanks.
> -- 
> View this message in context: http://old.nabble.com/RMQ-Java-Client---ChannelN.waitForConfirm-randomly-throwing-exceptions-tp33544834p33544845.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

More information about the rabbitmq-discuss mailing list