I'm getting desperate trying to handle errors when sending messages using Qpid Proton AMQP Messenger API for Python.
This is an example message sending session from the interactive Python interpreter when sending to a nonexistent queue myqueue on a Qpid broker running on localhost:
>>> from proton import *
>>> mng = Messenger()
>>> mng.timeout = 2000L
>>> m = Message()
>>> m.address = 'amqp://localhost/myqueue'
>>> m.subject = 'Test message'
>>> tracker = mng.put(m)
>>> repr(mng.status(tracker)) # status before send
'None'
>>> ret = mng.send() # send unconditionally returns None
LINK ERROR (amqp:not-found) Node not found: myqueue
>>> repr(mng.status(tracker)) # status after send
'None'
>>> mng.stop()
The LINK ERROR is printed directly to stdout (or stderr) and there is no indication of the message not being delivered in the API. The status() call returns None before the send when the message is sitting in the buffer and also after, when it was dropped.
Am I missing something?
Using Python 2.7, Qpid Proton 0.7.