Bug 1010955 - [amqp1.0] message group-id is not applied on amqp1.0 messages
Summary: [amqp1.0] message group-id is not applied on amqp1.0 messages
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 3.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks: 1010399
TreeView+ depends on / blocked
 
Reported: 2013-09-23 11:28 UTC by Petr Matousek
Modified: 2015-01-21 12:57 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-0.22-17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


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

Description Petr Matousek 2013-09-23 11:28:33 UTC
Description of problem:

When a amqp1.0 message is sent to message groups queue (regardless if defined with 0-10 or 1.0), the group key is not properly applied and all the messages belongs to qpid.no-group. Thus when a message is acquired and not accepted yet, another client fails to obtain messages, because all of them belongs to the same group.

---

I've noticed also another issue:
When message group queue is defined using amqp0-10 following info is listed by qpid-tools.

qpid-config queues:
MyMsgQueue                                --group-header=GROUP_KEY --shared-groups
qpid-tool list queue:
arguments              {u'qpid.group_header_key': u'GROUP_KEY', u'qpid.shared_msg_group': 1}

When defining a message group queue using amqp1.0 then, qpid-tools shows the following:

qpid-config queues:
MyMsgQueue                                             --group-header=GROUP_KEY
qpid-tool list queue:
arguments              {u'qpid.group_header_key': 'GROUP_KEY', u'qpid.shared_msg_group': '1'}

The '--shared-groups' option is not listed using qpid-config.
The desired argument seems to be set as shown by qpid-tool, there is only one difference - the value seems to by of type string

On the other hand, currently only '--shared-group' option is supported for message groups and should be default, so I don't expect any issues here.

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

How reproducible:
100%

Steps to Reproduce:
1. define a message groups queue, ie:
drain --connection-options "{protocol:'amqp1.0'}" "MyMsgQueue; {create:always, node: {x-declare: {arguments: {'qpid.group_header_key':'GROUP_KEY', 'qpid.shared_msg_group':1}}}}"
2. send messages several message on the message groups queue (ie. with groups keys 'A', 'A', 'B') 
spout --connection-options "{protocol:'amqp1.0'}" -P GROUP_KEY=A --content "a1" MyMsgQueue
spout --connection-options "{protocol:'amqp1.0'}" -P GROUP_KEY=A --content "a2" MyMsgQueue
spout --connection-options "{protocol:'amqp1.0'}" -P GROUP_KEY=B --content "b1" MyMsgQueue
3. use query command of qpid-tool to realize that all the messages on that queue belongs to qpid.no-group, ie:
call <broker-id> query queue MyMsgQueue
4. acquire a message using one consumer, do not accept yet
5. consume a message using another consumer
6. no message available for the second consumer because all the messages belongs to the same group (consumer shall consume 'B' group message)

Actual results:
message group functionality is not working

Expected results:
message group functionality properly working

Additional info:

Comment 1 Gordon Sim 2013-09-23 13:27:00 UTC
Fixed upstream: https://svn.apache.org/r1525584

Comment 2 Petr Matousek 2013-10-23 08:53:55 UTC
This issue has been fixed. Verified on rhel6.4 (i386, x86_64).

packages used for testing:
qpid-cpp-*-0.22-20.el6

-> VERIFIED


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