qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Receiver.unsettled()
Date Mon, 16 Jul 2012 12:41:16 GMT
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: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message