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

Bug 1070901

Summary: invalid reply-to conversion from 1.0 to 0.10
Product: Red Hat Enterprise MRG Reporter: Petr Matousek <pematous>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED ERRATA QA Contact: Matej Lesko <mlesko>
Severity: low Docs Contact:
Priority: low    
Version: DevelopmentCC: gsim, jross, mlesko, pematous
Target Milestone: 3.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.30-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-14 13:47:35 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:

Description Petr Matousek 2014-02-27 16:49:36 UTC
Description of problem:

When converting from 1.0 to 0-10, the reply to node is checked to figure out how to treat the name (whether it is a queue or an exchange). If the node refers to neither a known queue nor exchange then the resulting reply-to will be empty.

This is correct so far, but there is a suffix ';{node:{type:queue}' added to the empty string (if the node does not exist) which finally results in reply-to field set to ";{node:{type:queue}", which is probably not intended.

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

How reproducible:
100%

Steps to Reproduce:
1. spout --reply-to "non-existing-node"  --connection-options "{protocol:amqp1.0}" "queue;{create:always}"
2. drain queue
3. the reply-to field lists ';{node:{type:queue}}'

Actual results:
the reply-to field lists ';{node:{type:queue}}'

Expected results:
the reply-to field lists ''

Additional info:

# /usr/share/examples/messaging/spout --reply-to "non-existing-node" "queue;{create:always}" --connection-options "{protocol:amqp1.0}"
# ./qc2_drain queue --log-msg-dict
{'redelivered': False, 'reply-to': ';{node:{type:queue}}', 'subject': None, 'content_type': None, 'id': None, 'user_id': 'guest', 'correlation_id': None, 'priority': None, 'durable': False, 'ttl': 0, 'properties': {'spout-id': 'a58bb494-f1d8-448a-a8de-90a18eb0235c:0'}, 'content': None}

Comment 1 Gordon Sim 2014-04-16 17:29:44 UTC
This is a client side issue. The client sets the type of the address to be 'queue' when it sees the empty string as the exchange (i.e. the default exchange in 0-10 terms). If you test the reply to, then it returns false (e.g. if ( msg.getReplyTo()) std::cout << msg.getReplyTo; #won't print anything in this case), but the type can also be left unset, which is nicer.

Comment 2 Gordon Sim 2014-04-16 19:28:54 UTC
Fixed upstream: https://svn.apache.org/r1588004

Comment 4 Matej Lesko 2014-12-03 14:18:43 UTC
Tested with qpid-cpp-0.30-4:

--reply-to "non-existing-node" "queue;{create:always}" --connection-options "{protocol:amqp1.0}"

./qc2_drain queue --log-msgs dict
{'redelivered': False, 'reply_to': None, 'subject': None, 'content_type': None, 'id': None, 'user_id': None, 'correlation_id': None, 'priority': 0, 'durable': False, 'ttl': 0.000000e+00, 'size': None, 'properties': {'spout-id': '37badeb6-a82a-4b5e-86b1-369b40a88131:0'}, 'content': None}

Comment 6 errata-xmlrpc 2015-04-14 13:47:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-0805.html