qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakub Scholz <ja...@scholz.cz>
Subject accept() method in Proton/Python BlockingConnection
Date Mon, 04 Apr 2016 09:12:51 GMT
Hi,

I was playing with the Python binding for Proton - in particular with the
BlockingConnection.

I noticed following behavior with the BlockingReceiver:
- When I use the receiver to receive several messages without settling them
and call accept afterwards, it accepts only one message. My original
expectation was that it would accept all unsettled messages.
- When I call accept() without receiving any message, I get following
exception:
    Traceback (most recent call last):
       File
"/home/schojak/amqp/pycharm-projects/Python-Code-Examples/proton_binding/BlockingBroadcastReceiver.py",
line 67, in <module>
        br.run()
      File
"/home/schojak/amqp/pycharm-projects/Python-Code-Examples/proton_binding/BlockingBroadcastReceiver.py",
line 35, in run
        receiver.accept()
      File "/usr/lib/python2.7/dist-packages/proton/utils.py", line 143, in
accept
        self.settle(Delivery.ACCEPTED)
      File "/usr/lib/python2.7/dist-packages/proton/utils.py", line 157, in
settle
        self.fetcher.settle(state)
      File "/usr/lib/python2.7/dist-packages/proton/utils.py", line 116, in
settle
        delivery = self.unsettled.popleft()
    IndexError: pop from an empty deque

Are these two bugs? Or is this expected behavior?

Thanks & Regards
Jakub

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message