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

The message header section carries standard delivery details about the transfer of a message through the AMQP network. More...

#include <amqp_header.hpp>

Public Member Functions

 MessageHeader ()=default
 Default constructor.
 
 ~MessageHeader ()=default
 Destructor.
 
 MessageHeader (MessageHeader &&other)=default
 Move constructor.
 
MessageHeaderoperator= (MessageHeader &&other)=default
 Move assignment operator.
 
 MessageHeader (MessageHeader const &other)=default
 Copy constructor.
 
MessageHeaderoperator= (MessageHeader const &other)=default
 Copy assignment operator.
 
bool operator== (MessageHeader const &that) const noexcept
 Compare two AMQP Message Headers for equality.
 
bool ShouldSerialize () const noexcept
 Returns true if this MessageHeader should be serialized into an AMQP message.
 

Static Public Member Functions

static size_t GetSerializedSize (MessageHeader const &messageHeader)
 Returns the serialized size of this MessageHeader.
 
static std::vector< uint8_t > Serialize (MessageHeader const &messageHeader)
 Serializes this MessageHeader into a vector of bytes.
 
static MessageHeader Deserialize (std::uint8_t const *data, size_t size)
 Deserializes a vector of bytes into a MessageHeader.
 

Public Attributes

bool Durable {false}
 True if the message is considered "durable".
 
std::uint8_t Priority {4}
 Priority of the message.
 
Nullable< std::chrono::milliseconds > TimeToLive
 If present, defines the time to live for the message.
 
bool IsFirstAcquirer {false}
 If true, the message has not been acquired by any other link.
 
std::uint32_t DeliveryCount {0}
 The number of unsuccessful previous attempts to deliver this message.
 

Detailed Description

Remarks
For more information, see AMQP Section 3.2.1.

Member Function Documentation

◆ Deserialize()

MessageHeader Azure::Core::Amqp::Models::MessageHeader::Deserialize ( std::uint8_t const *  data,
size_t  size 
)
static
Remarks
This is used to create an AMQP message header from a vector of bytes.

◆ GetSerializedSize()

size_t Azure::Core::Amqp::Models::MessageHeader::GetSerializedSize ( MessageHeader const &  messageHeader)
static
Remarks
This is used to calculate the AMQP message size.

◆ operator==()

bool Azure::Core::Amqp::Models::MessageHeader::operator== ( MessageHeader const &  that) const
noexcept
Parameters
that- the AMQP Message Header to compare to.
Returns
true if the two headers are equal, false otherwise.

◆ Serialize()

std::vector< uint8_t > Azure::Core::Amqp::Models::MessageHeader::Serialize ( MessageHeader const &  messageHeader)
static
Remarks
This is used to serialize the AMQP message header.
Returns
A vector of bytes representing this MessageHeader.

◆ ShouldSerialize()

bool Azure::Core::Amqp::Models::MessageHeader::ShouldSerialize ( ) const
noexcept

Message headers can be serialize if their values are different from the defined default values as specified in the AMQP spec.

Member Data Documentation

◆ DeliveryCount

std::uint32_t Azure::Core::Amqp::Models::MessageHeader::DeliveryCount {0}
Remarks
For more information, see AMQP Section 3.2.1.

◆ Durable

bool Azure::Core::Amqp::Models::MessageHeader::Durable {false}
Remarks
For more information, see AMQP Section 3.2.1.

◆ IsFirstAcquirer

bool Azure::Core::Amqp::Models::MessageHeader::IsFirstAcquirer {false}
Remarks
For more information, see AMQP Section 3.2.1.

◆ Priority

std::uint8_t Azure::Core::Amqp::Models::MessageHeader::Priority {4}
Remarks
For more information, see AMQP Section 3.2.1.

◆ TimeToLive

Nullable<std::chrono::milliseconds> Azure::Core::Amqp::Models::MessageHeader::TimeToLive
Remarks
For more information, see AMQP Section 3.2.1.

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