I'm trying to use the receiver.unsettled() method of the python receiver
object (mostly to figure out what it does).

When I call it, however, I get this error:

Traceback (most recent call last):
  File "unsettled.py", line 14, in <module>
    msgs=rx.unsettled()
  File "<string>", line 6, in unsettled
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line
974, in unsettled
    return len([m for m in self.acked if m._receiver is self])
AttributeError: 'Receiver' object has no attribute 'acked'

Does the receiver needs to be created with some particular option to be
able to use this method?

Here's a minimal case that reproduces this error:

import sys
from qpid.messaging import *

connection=Connection("localhost:5672")
connection.open()
try:
  ssn=connection.session()
  rx=ssn.receiver("test; {create:always}")
  tx=ssn.sender("test")
  tx.send("hello")

  rx.fetch()
  msgs=rx.unsettled()
  print msgs
  ssn.acknowledge()

finally:
  connection.close()

Reply via email to