Bug 1012852 - [AMQP 1.0] Message size resolution differs for AMQP 0.10 and 1.0
[AMQP 1.0] Message size resolution differs for AMQP 0.10 and 1.0
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
3.0
Unspecified Unspecified
low Severity low
: 3.0
: ---
Assigned To: Gordon Sim
Zdenek Kraus
:
Depends On:
Blocks: 1010399
  Show dependency treegraph
 
Reported: 2013-09-27 05:21 EDT by Zdenek Kraus
Modified: 2015-01-21 07:55 EST (History)
5 users (show)

See Also:
Fixed In Version: qpid-cpp-0.22-19
Doc Type: Bug Fix
Doc Text:
It was discovered that qpid-cpp was only reporting broker statistics or enforcing queue depth limits based on the size of the AMPQ 0-10 message body, instead of additionally including the header size. This caused statistics to incorrectly reflect the size of headers in the message. For example, a message with no body but many headers would not contribute to the aggregate size in bytes of a queue onto which it was enqueued. Because AMQP 1.0 messages included headers and other meta-data with the message, this issue had the potential to introduce unnecessary confusion. The size of AMQP 0-10 messages is now fixed to take the sum of the content and headers segments into account when calculating the logical size of the message. Statistics and queue limits reported or controlled in bytes now more accurately reflect the logical size of the message, and there is less difference between the 1.0 and 0-10 encodings in terms of their overall size. It is expected that queue limits will be reached earlier due to the correct logical size now being reported and enforced.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-21 07:55:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Apache JIRA QPID-5199 None None None Never

  None (edit)
Description Zdenek Kraus 2013-09-27 05:21:21 EDT
Description of problem:
With AMQP 0.10 message size == size of content, but with AMQP 1.0 message size == whole (probably encoded) message. This should be unified.

Also 'size' parameter of the Message object in C++ contains only the size of content. Other languages lacks the size parameter.

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

How reproducible:
100%

Steps to Reproduce:
1. send message via amqp 0.10 with one character content
    ./spout --content "A" "amqp0-10;{create: always}"

2. send message via amqp 1.0 with one character content
    ./spout --connection-options "{ protocol: 'amqp1.0' }" --content "A" "amqp1.0;{create: always}"

3. observe result
qpid-stat -q

Actual results:
Queues
  queue                                     dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =========================================================================================================================
  89fbce1d-0b95-4e16-877b-b0d32876b93d:0.0       Y        Y        0     0      0       0      0        0         1     2
  amqp0-10                                                         1     1      0       1      1        0         0     1
  amqp1.0                                                          1     1      0     101    101        0         0     1



Expected results:
Queues
  queue                                     dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =========================================================================================================================
  89fbce1d-0b95-4e16-877b-b0d32876b93d:0.0       Y        Y        0     0      0       0      0        0         1     2
  amqp0-10                                                         1     1      0       1      1        0         0     1
  amqp1.0                                                          1     1      0       1      1        0         0     1

## OR ##
Queues
  queue                                     dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =========================================================================================================================
  89fbce1d-0b95-4e16-877b-b0d32876b93d:0.0       Y        Y        0     0      0       0      0        0         1     2
  amqp0-10                                                         1     1      0     101    101        0         0     1
  amqp1.0                                                          1     1      0     101    101        0         0     1


Additional info:
This difference also influence others, for example limit enforcement for message sizes.
Comment 1 Gordon Sim 2013-10-03 09:38:38 EDT
Fixed upstream: https://svn.apache.org/r1528852
Comment 4 Gordon Sim 2013-10-11 15:59:43 EDT
Unset the skip-errata flag as this will affect existing 0-10 based deployments, though admittedly the issue is described as a comparison with 1.0.
Comment 7 Zdenek Kraus 2014-01-14 08:46:24 EST
This was tested on RHEL 6.5 i686, x86_64 with following packages:

perl-qpid-0.22-7.el6
python-qpid-0.22-9.el6
python-qpid-qmf-0.22-25.el6
qpid-cpp-client-0.22-31.el6
qpid-cpp-client-devel-0.22-31.el6
qpid-cpp-client-devel-docs-0.22-31.el6
qpid-cpp-client-ssl-0.22-31.el6
qpid-cpp-debuginfo-0.22-31.el6
qpid-cpp-server-0.22-31.el6
qpid-cpp-server-devel-0.22-31.el6
qpid-cpp-server-ha-0.22-31.el6
qpid-cpp-server-linearstore-0.22-31.el6
qpid-cpp-server-ssl-0.22-31.el6
qpid-cpp-server-xml-0.22-31.el6
qpid-java-client-0.22-5.el6
qpid-java-common-0.22-5.el6
qpid-java-example-0.22-5.el6
qpid-jca-0.22-1.el6
qpid-jca-xarecovery-0.22-1.el6
qpid-proton-c-0.6-1.el6
qpid-proton-c-devel-0.6-1.el6
qpid-qmf-0.22-25.el6
qpid-snmpd-1.0.0-15.el6
qpid-tools-0.22-7.el6
ruby-qpid-qmf-0.22-25.el6


fix work as expected.

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