Bug 988297 - qpid::messaging::Message API doesn't permit sending non-string message IDs
qpid::messaging::Message API doesn't permit sending non-string message IDs
Status: NEW
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
Development
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Gordon Sim
Messaging QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-25 05:20 EDT by Frantisek Reznicek
Modified: 2015-11-15 20:17 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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-5180 None None None Never

  None (edit)
Description Frantisek Reznicek 2013-07-25 05:20:17 EDT
Description of problem:

qpid::messaging::Message API does not fully model AMQP 1.0 Message enhancements.


qpid::messaging resp. qpid.messaging API was built with AMQP 0-10 in mind.
AMQP 1.0 come with some changes in Message model:
message-id may be in various types:
  <field name="message-id" type="*" requires="message-id"/>

  <type name="message-id-ulong" class="restricted" source="ulong" provides="message-id"/>
  <type name="message-id-uuid" class="restricted" source="uuid" provides="message-id"/>
  <type name="message-id-binary" class="restricted" source="binary" provides="message-id"/>
  <type name="message-id-string" class="restricted" source="string" provides="message-id"/>

See [1] chapters 3.2.4, 3.2.11 - 3.2.14.

Moreover there were added following message properties:
  <field name="to" type="*" requires="address"/>
  <field name="subject" type="string"/>
  <field name="group-id" type="string"/>
  <field name="group-sequence" type="sequence-no"/>
  <field name="reply-to-group-id" type="string"/>

 ( <field name="absolute-expiry-time" type="timestamp"/> matches probably to expriration in amqp 0-10)

I was comparing [1] 3.2.4 Properties vs. [2] 'Domain: message.message-properties'


The qpid proton APIs are at the moment reflecting [1] 3.2.4 table well except field 'to' which is there not available as well.

Is there plan to extend qpid::messaging / qpid.messaging to support also AMQP 1.0 specific fields? If not it is necessary to guide users using documentation to use qpid proton API.
Feel free to reassign to docs based on your judgement.


[1] http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html
[2] amqp.0-10.pdf
[3] http://qpid.apache.org/releases/qpid-0.22/messaging-api/cpp/api/classqpid_1_1messaging_1_1Message.html
[4] pylint qpid.messaging.Message


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

How reproducible:
100%

Steps to Reproduce:
1. check [3] getMessageId() method > std::string & 	getMessageId () const 
2. AMQP 1.0 says ([1] chapters 3.2.4) it may be string

Actual results:
qpid::messaging does not fully support AMQP 1.0 message

Expected results:
qpid::messaging to fully support AMQP 1.0 message or document there are some gaps.

Additional info:
Comment 1 Justin Ross 2013-08-05 11:32:55 EDT
Gordon, please assess.
Comment 2 Gordon Sim 2013-08-05 11:55:45 EDT
Regarding the possibility of different message-id types, the code at present should map all 1.0 allowed types onto a string for incoming messages. If the id is a UUID this will be the stringified representation of the UUID; if the id is a long, this will be a string representing that number (e.g. "1000346"), if it is a binary or a string then it will hold the actual bytes as sent. However at present there is no way to send an id as anything other than a string. That should really be fixed.

Regarding the added message properties, the AMQP 1.0 specific fields can be accessed as pseudo-properties using the key format x-amqp-<field-name>, where <field-name> is the name of the field in the AMQP 1.0 specification.  The keys currently in use are: x-amqp-first-acquirer and x-amqp-delivery-count for the header section, and x-amqp-to, x-amqp-absolute-expiry-time, x-amqp-creation-time, x-amqp-group-id, x-amqp-qroup-sequence and
x-amqp-reply-to-group-id for the properties section. Of course explicit accessors could also be added for these, but that would be more for convenience rather than absolute necessity.
Comment 3 Justin Ross 2013-09-26 13:15:34 EDT
"However at present there is no way to send an id as anything other than a string. That should really be fixed."

I'm taking this to be the content of this issue as of now.
Comment 4 Gordon Sim 2013-09-26 13:19:57 EDT
Yes, that is the issue. My view is it isn't super urgent (correct me if that is wrong). Its very much a case of anticipating corner cases. I've added https://issues.apache.org/jira/browse/QPID-5180 upstream to track the issue.

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