Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 548141

Summary: Unable to examine redelivered flag (and other delivery properties) through new Python API
Product: Red Hat Enterprise MRG Reporter: Kim van der Riet <kim.vdriet>
Component: python-qpidAssignee: Rafael H. Schloming <rafaels>
Status: CLOSED ERRATA QA Contact: Frantisek Reznicek <freznice>
Severity: medium Docs Contact:
Priority: high    
Version: DevelopmentCC: esammons, freznice, tross
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-20 11:30:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 508144    

Description Kim van der Riet 2009-12-16 18:37:06 UTC
The new Python API does not allow delivery properties to be examined on a message received by Receiver.

Comment 1 Frantisek Reznicek 2010-10-01 09:22:53 UTC
The feature was implemented as qpid.messaging.message.Message properties/attributes. Tested on RHEL 4.8 / 5.5 i386 / x86_64 on package[s]:
python-qpid-0.7.946106-14.el5


-> VERIFIED

[root@mrg-qe-02 bz514054]# python
Python 2.4.3 (#1, Sep  8 2010, 11:37:47)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> from qpid.messaging import *
>>> from qpid.util import URL
>>> from qpid.log import enable, DEBUG, WARN
>>> import qpid.messaging.util
>>>
>>>
>>> addr='myqueue_addr ; {create:sender, delete: receiver}'
>>>
>>>
>>> conn = Connection(url="localhost:5672",
...                   username='quest',
...                   password='quest' )
>>>
>>> conn.open();
>>>
>>>
>>> ssn = conn.session();
>>>
>>> snd = ssn.sender(addr);
>>>
>>> msg = Message(content="Hi!");
>>> snd.send(msg)
>>>
>>>
>>> rcv = ssn.receiver(addr)
>>> msg2 = rcv.fetch(timeout=10)
>>>
>>> ssn.close();
>>> conn.close();
>>>
>>>
>>> print msg, msg2
Message('Hi!') Message(properties={'x-amqp-0-10.routing-key': u'myqueue_addr'}, content='Hi!')
>>> print msg.redelivered
False
>>> print msg2.redelivered
False
>>> dir(qpid.messaging.Message)
['__doc__', '__init__', '__module__', '__repr__']
>>> msg
Message('Hi!')
>>> dir(msg)
['__doc__', '__init__', '__module__', '__repr__', '_sender', '_sync', 'content', 'content_type', 'correlation_id', 'durable', 'id', 'priority', 'properties', 'redelivered', 'reply_to', 'subject', 'ttl', 'user_id']
>>> type(msg)
<type 'instance'>
>>> print msg.__class__
qpid.messaging.message.Message