Bug 1009816

Summary: [amqp1.0] time-to-live message property not supported
Product: Red Hat Enterprise MRG Reporter: Leonid Zhaldybin <lzhaldyb>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Zhaldybin <lzhaldyb>
Severity: high Docs Contact:
Priority: medium    
Version: DevelopmentCC: esammons, gsim, iboverma, jross, pematous
Target Milestone: 3.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.22-17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-20 13:51:23 UTC Type: Bug
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: 1010399    

Description Leonid Zhaldybin 2013-09-19 08:30:01 UTC
Description of problem:
If the message is sent to the qpidd broker with time-to-live property set to some value over AMQP1.0 protocol, this value is ignored and the message stays on the broker forever (more precisely, until it is consumed).
Sending a message to the broker over the old (AMQP-0.10) protocol:

[root@lzhaldyb-rhel64x ~]# qpid-send --ttl 100000 -a test 
[root@lzhaldyb-rhel64x ~]# qpid-receive -a "test; {mode:browse}" --print-headers yes
TTL: 90969
Redelivered: true
Properties: {sn:1, ts:1379578988398828486, x-amqp-0-10.routing-key:test}


[root@lzhaldyb-rhel64x ~]# qpid-receive -a "test; {mode:browse}" --print-headers yes
TTL: 89362
Redelivered: true
Properties: {sn:1, ts:1379578988398828486, x-amqp-0-10.routing-key:test}


[root@lzhaldyb-rhel64x ~]# qpid-receive -a "test; {mode:browse}" --print-headers yes
TTL: 87634
Redelivered: true
Properties: {sn:1, ts:1379578988398828486, x-amqp-0-10.routing-key:test}

So, the message on the broker contains a header named TTL, the value of which decreases over time. If the new (AMQP1.0) protocol version is used:

[root@lzhaldyb-rhel64x ~]# qpid-send --ttl 10000 -a test --connection-options "{ protocol : 'amqp1.0' }"
[root@lzhaldyb-rhel64x ~]# qpid-receive -a "test; {mode:browse}" --print-headers yes
Redelivered: true
Properties: {sn:1, ts:1379579127626723791}


[root@lzhaldyb-rhel64x ~]# qpid-receive -a "test; {mode:browse}" --print-headers yes
Redelivered: true
Properties: {sn:1, ts:1379579127626723791}


[root@lzhaldyb-rhel64x ~]# sleep 20
[root@lzhaldyb-rhel64x ~]# qpid-receive -a "test; {mode:browse}" --print-headers yes
Redelivered: true
Properties: {sn:1, ts:1379579127626723791}

results in no such header and the message not expiring on the broker.

Version-Release number of selected component (if applicable):
qpid-cpp-*-0.22-14.el6

How reproducible:
100%

Steps to Reproduce:
1. Send a message to the broker with time-to-live property set to some value over AMQP 1.0 protocol.
2. Browse the message on the broker and check its headers.
3.

Actual results:
There is no TTL header and the message does not expire.

Expected results:
The message has TTL header, the value of which decreases over time. The message expires (cannot be consumed) when this value reaches 0.

Additional info:

Comment 1 Gordon Sim 2013-09-20 15:51:51 UTC
Fixed upstream: https://svn.apache.org/r1525042

Comment 2 Leonid Zhaldybin 2013-10-22 11:52:11 UTC
This issue has been fixed. Tested on RHEL6, i386 and x86_64.

Packages used for testing:

python-qpid-0.22-5.el6
python-qpid-qmf-0.22-18.el6
qpid-cpp-client-0.22-21.el6
qpid-cpp-client-devel-0.22-21.el6
qpid-cpp-client-devel-docs-0.22-21.el6
qpid-cpp-client-ssl-0.22-21.el6
qpid-cpp-server-0.22-21.el6
qpid-cpp-server-devel-0.22-21.el6
qpid-cpp-server-ha-0.22-21.el6
qpid-cpp-server-ssl-0.22-21.el6
qpid-cpp-server-store-0.22-21.el6
qpid-cpp-server-xml-0.22-21.el6
qpid-java-amqp-0-10-client-jms-0.23-4.el6
qpid-java-client-0.23-4.el6
qpid-java-common-0.23-4.el6
qpid-java-example-0.23-4.el6
qpid-jca-0.22-1.el6
qpid-jca-xarecovery-0.22-1.el6
qpid-proton-c-0.5-6.el6
qpid-proton-c-devel-0.5-6.el6
qpid-qmf-0.22-18.el6
qpid-snmpd-1.0.0-12.el6
qpid-tools-0.22-6.el6

-> VERIFIED