Quick Links:

bmqa | bmqpi | bmqt

Namespaces

Component bmqa_message
[Package bmqa]

Provide the application with a message data object. More...

Namespaces

namespace  bmqimp
namespace  bmqa

Detailed Description

Outline
Purpose:
Provide the application with a message data object.
Classes:
bmqa::Message message received from/sent to a queue
bmqa::MessageConfirmationCookie cookie for async message confirmation
See also:
bmqa::MessageEvent : Mechanism for data event notification. bmqa::MessageEventBuilder: Builder for bmqa::MessageEvent
Description:
A bmqa::Message represents the data message to put on a queue, or retrieved from a queue. It is composed of the following fields:
  • A message GUID, which is a printable string generated by the broker to uniquely identify this message.
  • A correlation Id, which is a user-provided identifier for the message.
  • A queue Id, to map with the queue this message is associated with.
  • The payload, which is opaque to the framework. At some point, framework may provide utilities to encode and decode schema messages using various CODECs. For example, a JavaScript publisher may publish a message into a queue using a JSON object as payload, and the consumer may be receiving that payload as a BER-encoded schema object.
  • At some point, system properties such as version, encoding, timestamp, priority, message group and "reply-to" will be supported. System properties will be used by the broker; for example to deliver high-priority messages first or to filter based on a minimum version.
  • At some point, application-defined message properties will also be supported, where properties are a list of name-value pairs.
A bmqa::MessageConfirmationCookie is a small object which allows to confirm a bmqa::Message asynchronously without having to hold on to the entire message. This can be useful when, for example, the message is decoded in the event handler, and the resulting object is enqueued for asynchronous processing, along with that small cookie object for confirming the message once successfully processed.