Bug 1204130 - released message is not marked as redelivered
Summary: released message is not marked as redelivered
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: Development
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: Messaging QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-20 12:58 UTC by Petr Matousek
Modified: 2024-01-19 19:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1018746
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-5230 0 None None None Never

Comment 1 Petr Matousek 2015-03-20 13:34:35 UTC
This issue is also valid for qpid::messaging python client with the difference that this applies to receiving from exchange only (when receiving from queue the redelivered flag is set as expected). So the reproduction scenario needs to be slightly changed:

Steps to Reproduce:
1. create a subscription from an exchange that releases incoming messages (use reliable link!)
2. send a message towards the exchange
3. the redelivered flag of the released message (which was returned to the exchange and acquired again) is set to false, but shall be true.

ie:
1. /var/dtests/node_data/clients/qc2_drain.py --f -c 2 --log-msgs dict --accept release "amq.direct;{link:{reliability:at-least-once}}"
2. $pyapi/spout "amq.direct"
3. the second acquired message shall have the redelivered flag set to true

--
Terminal transcript

PYTHON cli:
#  /var/dtests/node_data/clients/qc2_drain.py --f -c 2 --log-msgs dict --accept release "amq.direct;{link:{reliability:at-least-once}}"
{'redelivered': False, 'reply_to': None, 'subject': None...}
{'redelivered': False, 'reply_to': None, 'subject': None...}

C++ cli:
{'redelivered': False, 'reply_to': None, 'subject': None...}
{'redelivered': True, 'reply_to': None, 'subject': None...}

Comment 2 Petr Matousek 2015-03-20 15:35:47 UTC
(In reply to Petr Matousek from comment #1)
> This issue is also valid for qpid::messaging python client with the
> difference that this applies to receiving from exchange only

Correction: applies to queues as well:

1. create a queue and send a message towards it
2. acquire and release the message
3. acquire again the released message (which was returned to the queue)
4. redelivered flag is set to false, but shall be true

--
--
Terminal transcript

./spout.py "q;{create:always}"

PYTHON cli:
./var/dtests/node_data/clients/qc2_drain.py --log-msgs dict -c 2 --accept release q
{'redelivered': False, 'reply_to': None, 'subject': None...}
{'redelivered': False, 'reply_to': None, 'subject': None...}

C++ cli:
{'redelivered': False, 'reply_to': None, 'subject': None...}
{'redelivered': True, 'reply_to': None, 'subject': None...}

Comment 4 Gordon Sim 2015-03-23 16:22:52 UTC
The API in python allows the 'set-redelivered' flag, defined by AMQP 0-10, to be controlled by the application, e.g.

    ssn.acknowledge(msg, Disposition(RELEASED, set_redelivered=True))

If that is done, then it should be marked redelivered on subsequent retrieval.

Comment 5 Petr Matousek 2015-03-24 10:24:03 UTC
(In reply to Gordon Sim from comment #4)
> The API in python allows the 'set-redelivered' flag, defined by AMQP 0-10,
> to be controlled by the application, e.g.
> 
>     ssn.acknowledge(msg, Disposition(RELEASED, set_redelivered=True))
> 
> If that is done, then it should be marked redelivered on subsequent
> retrieval.

Correct, It's not done by default (like with other clients), ie:
  ssn.acknowledge(msg, Disposition(RELEASED)

but it may be explicitly set by the application
  ssn.acknowledge(msg, Disposition(RELEASED, set_redelivered=True))

Although this is a bit inconsistent, it makes this issue a very low priority in my eyes.


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