[rabbitmq-discuss] [Java-client] How to catch the error or exception while call basic operation?

Matthias Radestock matthias at rabbitmq.com
Sun Jun 30 11:59:34 BST 2013


On 27/06/13 18:46, pprun wrote:
> I have code call channel.basicPublish(exchangeName, routingKey, props,
> message.getBytes());,  without firstly declare the exchange.
>
> Although the method return normally, but server log the error, as below:
>
> =ERROR REPORT==== 28-Jun-2013::01:35:50 ===
> connection <0.853.0>, channel 1 - soft error:
> {amqp_error,not_found,
>              "no exchange
> 'com.abc.mq.ex.d2ac3c5c-1caf-4c73-bbdf-2024a0e5c092' in vhost '/'",
>              'basic.publish'}
>
>
> My question is how to catch the error/exception, so clients know there's
> failure?

See 
http://rabbitmq.1065348.n5.nabble.com/Cathing-broker-shut-down-in-a-consumer-tp24159p24210.html


Matthias.


More information about the rabbitmq-discuss mailing list