Bug 1009525

Summary: [amqp1.0] 0-10 consumer is disconnected when trying to consume message with routing key longer than 255 characters
Product: Red Hat Enterprise MRG Reporter: Petr Matousek <pematous>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Matousek <pematous>
Severity: medium Docs Contact:
Priority: medium    
Version: DevelopmentCC: esammons, gsim, iboverma, jross, ltroan
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: 2015-01-21 12:55:05 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, 1024955    

Description Petr Matousek 2013-09-18 15:09:24 UTC
Description of problem:

As a result of bug 812376, the 0-10 client reports following exception when trying to produce/consume message with routing key longer than 255 characters:
illegal-argument: Value for routingKey is too large

This limitation does not applies for 1.0 clients, ie. producing/consuming using routing key longer than 255 characters works well.

When 0-10 receiver is consuming messages and a message with routing key longer than 255 characters is sent to the consumer using 1.0 producer, the consumer ends with an exception.

So it is possible to send a message using 1.0 producer that forces the 0-10 consumers to disconnect (although with proper exception).

I am not claiming that this behavior is necessary wrong, the proper exception is reported. I am raising the bug in order to let the team thing about the correct behavior here. If this would be identified as correct behavior it should be at least documented. In this case please change the component to doc.

Notes:
When ignoring the exception on the client side, next fetch command gets again the same message and ends in a loop.
Reconnect won't help in this case

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

How reproducible:
100%

Steps to Reproduce:
1. ./drain amq.topic/a.* -f
2. ./spout --connection-options {protocol:amqp1.0}  "amq.topic/a.AReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubjectAReallyLongSubject"
3. subscription ends with following exception:
illegal-argument: Value for routingKey is too large

Actual results:
amqp0-10 clients ends with exception on receiving a message with routing key longer than 255 characters.

Expected results:
not sure

Additional info:

Comment 1 Gordon Sim 2013-09-20 15:55:32 UTC
Fixed upstream: https://svn.apache.org/r1525043

This will truncate the routing key, but it will also be available in original form via the subject, sent as qpid.subject over 0-10.

Comment 2 Petr Matousek 2014-02-13 16:13:48 UTC
This issue has been fixed. Verified on rhel6.5 (x86_64, i386).

packages under test:
qpid-cpp-*-0.22-35

-> VERIFIED