[rabbitmq-discuss] AlreadyClosedException in Java client

jiri at krutil.com jiri at krutil.com
Wed Nov 3 11:48:39 GMT 2010


Matthias,

>> Is it possible that this is the actual problem
>> and the Java client is only reporting misleading error messages?
>
> Publishing is asynchronous, which means basic.publish itself will  
> never "return" any error that it may have triggered. Instead the  
> error is handled asynchronously by the client library code. The  
> AlreadyClosedException you are seeing is due to library having  
> received and processed the server-initiated channel.close already by  
> the time the application tries to close the channel.

Is there a way to say that the channel should remain open even if an  
error occurs in basic.publish?

Or a way how to get register a channel.close listener, so that I know  
I need to re-open the channel in case I want to continue using it?

Thanks
Jiri



More information about the rabbitmq-discuss mailing list