azure-core-amqp
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Azure::Core::Amqp::Models::MessageProperties Struct Referencefinal

Represents the immutable properties of an AMQP message. More...

#include <amqp_properties.hpp>

Public Member Functions

 MessageProperties ()=default
 Default constructor.
 
 ~MessageProperties ()=default
 Destructor.
 
 MessageProperties (MessageProperties &&other)=default
 Move Constructor.
 
MessagePropertiesoperator= (MessageProperties &&other)=default
 Move Assignment operator.
 
 MessageProperties (MessageProperties const &other)=default
 Copy Constructor.
 
MessagePropertiesoperator= (MessageProperties const &other)=default
 Copy Assignment operator.
 
bool operator== (MessageProperties const &that) const noexcept
 Compare two message properties objects.
 
bool ShouldSerialize () const noexcept
 Should this MessageProperties object be serialized.
 

Static Public Member Functions

static std::vector< uint8_t > Serialize (MessageProperties const &properties)
 Serialize a MessageProperties object into a vector of bytes.
 
static MessageProperties Deserialize (uint8_t const *data, size_t size)
 Deserialize a MessageProperties object from a vector of bytes.
 

Public Attributes

Nullable< AmqpValueMessageId
 The message-id, if set, uniquely identifies a message within the message system. The message producer is usually responsible for setting the message-id in such a way that it is assured to be globally unique. A broker MAY discard a message as a duplicate if the value of the message-id matches that of a previously received message sent to the same node.
 
Nullable< std::vector< uint8_t > > UserId
 User ID.
 
Nullable< AmqpValueTo
 The to field identifies the node that is the intended destination of the message.
 
Nullable< std::string > Subject
 The subject of the message.
 
Nullable< AmqpValueCorrelationId
 This is a client-specific id that can be used to mark or identify messages between clients.
 
Nullable< AmqpValueReplyTo
 The address of the node to send replies to.
 
Nullable< std::string > ContentType
 The content-type field describes the payload type.
 
Nullable< std::string > ContentEncoding
 MIME Content Encoding.
 
Nullable< std::chrono::system_clock::time_point > AbsoluteExpiryTime
 The absolute expiry time of the message.
 
Nullable< std::chrono::system_clock::time_point > CreationTime
 the time when this message was created.
 
Nullable< std::string > GroupId
 The group this message belongs to.
 
Nullable< uint32_t > GroupSequence
 The sequence-number of this message within its group .
 
Nullable< std::string > ReplyToGroupId
 The group the reply message belongs to.
 

Detailed Description

The properties section is part of the bare message used for a range of features including reliable delivery, routing and security.

See also
https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties

Constructor & Destructor Documentation

◆ MessageProperties()

Azure::Core::Amqp::Models::MessageProperties::MessageProperties ( )
default

Creates an empty MessageProperties object.

◆ ~MessageProperties()

Azure::Core::Amqp::Models::MessageProperties::~MessageProperties ( )
default

Destroys the MessageProperties object.

Member Function Documentation

◆ Deserialize()

MessageProperties Azure::Core::Amqp::Models::MessageProperties::Deserialize ( uint8_t const *  data,
size_t  size 
)
static
Parameters
dataThe vector of bytes representing the serialized MessageProperties object.
sizeThe size of the vector of bytes.
Returns
The deserialized MessageProperties object.

◆ operator==()

bool Azure::Core::Amqp::Models::MessageProperties::operator== ( MessageProperties const &  that) const
noexcept
Parameters
thatThe other message properties object to compare with.

◆ Serialize()

std::vector< uint8_t > Azure::Core::Amqp::Models::MessageProperties::Serialize ( MessageProperties const &  properties)
static
Parameters
propertiesThe MessageProperties object to serialize.
Returns
A vector of bytes representing the serialized MessageProperties object.

◆ ShouldSerialize()

bool Azure::Core::Amqp::Models::MessageProperties::ShouldSerialize ( ) const
noexcept
Returns
true if the object should be serialized, false otherwise.

Member Data Documentation

◆ AbsoluteExpiryTime

Nullable<std::chrono::system_clock::time_point> Azure::Core::Amqp::Models::MessageProperties::AbsoluteExpiryTime

An absolute time when this message is considered to be expired.

◆ ContentEncoding

Nullable<std::string> Azure::Core::Amqp::Models::MessageProperties::ContentEncoding

The content-encoding property is used as a modifier to the content-type. When present, its value indicates what additional content encodings have been applied to the application-data, and thus what decoding mechanisms need to be applied in order to obtain the media-type referenced by the content-type header field.

Content-encoding is primarily used to allow a document to be compressed without losing the identity of its underlying content type.

Content-encodings are to be interpreted as per section 3.5 of RFC 2616 [RFC2616]. Valid content-encodings are registered at IANA [IANAHTTPPARAMS].

The content-encoding MUST NOT be set when the application-data section is other than data. The binary representation of all other application-data section types is defined completely in terms of the AMQP type system.

Implementations MUST NOT use the identity encoding. Instead, implementations SHOULD NOT set this property. Implementations SHOULD NOT use the compress encoding, except as to remain compatible with messages originally sent with other protocols, e.g. HTTP or SMTP.

Implementations SHOULD NOT specify multiple content-encoding values except as to be compatible with messages originally sent with other protocols, e.g. HTTP or SMTP.

◆ ContentType

Nullable<std::string> Azure::Core::Amqp::Models::MessageProperties::ContentType

The RFC-2046 RFC2046 MIME type for the message's application-data section (body). As per RFC-2046 [RFC2046] this can contain a charset parameter defining the character encoding used: e.g., 'text/plain; charset="utf-8"'.

For clarity, as per section 7.2.1 of RFC-2616 RFC2046, where the content type is unknown the content-type SHOULD NOT be set. This allows the recipient the opportunity to determine the actual type. Where the section is known to be truly opaque binary data, the content-type SHOULD be set to application/octet-stream.

When using an application-data section with a section code other than data, content-type SHOULD NOT be set

◆ GroupId

Nullable<std::string> Azure::Core::Amqp::Models::MessageProperties::GroupId

Identifies the group the message belongs to.

◆ GroupSequence

Nullable<uint32_t> Azure::Core::Amqp::Models::MessageProperties::GroupSequence

The relative position of this message within its group.

◆ MessageId

Nullable<AmqpValue> Azure::Core::Amqp::Models::MessageProperties::MessageId
Remarks
The message producer is usually responsible for setting the message-id in such a way that it is assured to be globally unique.

◆ ReplyToGroupId

Nullable<std::string> Azure::Core::Amqp::Models::MessageProperties::ReplyToGroupId

This is a client-specific id that is used so that client can send replies to this message to a specific group

◆ Subject

Nullable<std::string> Azure::Core::Amqp::Models::MessageProperties::Subject

A common field for summary information about the message content and purpose.

◆ To

Nullable<AmqpValue> Azure::Core::Amqp::Models::MessageProperties::To
Remarks
A message with no to field is interpreted as being addressed to the implied "anonymous" node.

◆ UserId

Nullable<std::vector<uint8_t> > Azure::Core::Amqp::Models::MessageProperties::UserId

The identity of the user responsible for producing the message. The client sets this value, and it MAY be authenticated by intermediaries.


The documentation for this struct was generated from the following files: