[rabbitmq-discuss] pika - dealing with exceptions

Marcin Krol mrkafk at gmail.com
Mon Jan 24 20:26:45 GMT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(I'm not sure there is dedicated mailing list for pika, so I'm posting
this here in hope that somebody solved this issue)

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>
(<type 'exceptions.KeyError'>:1 [/usr/lib/python2.5/asyncore.py|read|68]
[/usr/lib/python2.5/asyncore.py|handle_read_event|390]
[/usr/local/bin/src/pika/pika/asyncore_adapter.py|handle_read|91]
[/usr/local/bin/src/pika/pika/connection.py|on_data_available|268]
[/usr/local/bin/src/pika/pika/connection.py|_generic_frame_handler|416])

Is there a way of addressing this problem?




- --

Regards,
mk

- --
Premature optimization is the root of all fun.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNPeCFAAoJEFMgHzhQQ7hOPcMH/0Ldho1YKjqSm+Ulnw8ovizG
FD/vQZ2CY85PcNNbffRZE2DVUVzx5sK0PF+1/ICa0yjo15+4bXTGqUqQeat+l1mJ
djKjABsFTkjPqYbA1je6A2DnKYT0w4ELmLTJUD9KzSRApgRadXDSIUK89NjmWN6z
N6G0MB5oIF8Ejr/n8HK/oS2ynBC+XhnwFt1qim8IfYhhabb8Ocn4iEFrbUprjOLL
YyxN1XqMgcuDVgCTejcCKEj4bNoWQJE4oPJ9GI6posbDlAGe3zIgquAtG/d3PruD
vcBfTcO5X0O7kBqJ4eyeCqQGECAqtVX5/FcwZZGQFnhGlUbAfhT+A5O6MNa1L1Y=
=0hzb
-----END PGP SIGNATURE-----


More information about the rabbitmq-discuss mailing list