On 07/16/2012 01:22 PM, Sitapati das / Joshua J Wulf wrote:
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?
No, that looks like a bug. Does ssn.unsettled() give the same error?
Could you raise a JIRA and list the version you are using? Thanks!
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()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]