[rabbitmq-discuss] java-client: Reproducable "COMMAND_INVALID - second 'channel.open' seen"

Victor Boivie victor at boivie.com
Wed Mar 27 06:26:43 GMT 2013


I have been having some problems with the java-rabbitmq-client when stress
testing it. I frequently get "COMMAND_INVALID - second 'channel.open'
seen", which eventually closes the connection (not just the channel).

It seems that there is a race condition when channels are closed
asynchronously (due to errors), and created in other threads. The channel
that is closed (by the server) doesn't seem to be fully closed before
another thread can try to open a channel with the same number.

The code to reproduce it is at https://github.com/boivie/rmq-stress-test

A possible fix is below.

Thanks,
Victor



More information about the rabbitmq-discuss mailing list