[rabbitmq-discuss] pika - dealing with exceptions

Marek Majkowski majek04 at gmail.com
Tue Jan 25 10:46:17 GMT 2011


On Mon, Jan 24, 2011 at 20:26, Marcin Krol <mrkafk at gmail.com> wrote:
> (I'm not sure there is dedicated mailing list for pika, so I'm posting
> this here in hope that somebody solved this issue)

This mailing list is okay. Tony (the author of pika) is reading
this list, and we also have quite a few Pika users here.

> Suppose you have a temp callback queue and (RPC) client disconnects
> before server can reply and send in the message back to the queue.
> Server:
> ch.basic_publish(exchange='', routing_key=props.reply_to,
>      body = result)
> Client:
> result = self.channel.queue_declare(exclusive=True)
> self.callback_queue = result.queue
> self.channel.basic_consume(self.on_response, no_ack=True,
> queue=self.callback_queue)
> I'm getting exceptions in server like this, probably in such a situation:
> error: uncaptured python exception, closing channel
> <pika.asyncore_adapter.RabbitDispatcher connected at 0x7f79653106c8>

Right. You should not see a 'channel exception' when you're publishing to
a non-existing queue - ie: wrong routing key. Test code:

On the other hand the 'channel error' while publishing will be triggered
when you're publishing to non-existing *exchange*.

Please check if the exchange exists.


More information about the rabbitmq-discuss mailing list