Bug 548141 - Unable to examine redelivered flag (and other delivery properties) through new Python API
Summary: Unable to examine redelivered flag (and other delivery properties) through ne...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: Development
Hardware: All
OS: Linux
high
medium
Target Milestone: 1.3
: ---
Assignee: Rafael H. Schloming
QA Contact: Frantisek Reznicek
URL:
Whiteboard:
Depends On:
Blocks: 508144
TreeView+ depends on / blocked
 
Reported: 2009-12-16 18:37 UTC by Kim van der Riet
Modified: 2015-11-16 01:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-20 11:30:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.