You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Jakub Scholz <ja...@scholz.cz> on 2016/04/04 11:12:51 UTC

accept() method in Proton/Python BlockingConnection

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