Class BasicDeliverEventArgs
Contains all the information about a message delivered from an AMQP broker within the Basic content-class.
public class BasicDeliverEventArgs : AsyncEventArgs
- Inheritance
-
BasicDeliverEventArgs
- Inherited Members
Constructors
BasicDeliverEventArgs(string, ulong, bool, string, string, IReadOnlyBasicProperties, ReadOnlyMemory<byte>, CancellationToken)
Constructor that fills the event's properties from its arguments.
public BasicDeliverEventArgs(string consumerTag, ulong deliveryTag, bool redelivered, string exchange, string routingKey, IReadOnlyBasicProperties properties, ReadOnlyMemory<byte> body, CancellationToken cancellationToken = default)
Parameters
consumerTag
stringdeliveryTag
ulongredelivered
boolexchange
stringroutingKey
stringproperties
IReadOnlyBasicPropertiesbody
ReadOnlyMemory<byte>cancellationToken
CancellationToken
Fields
BasicProperties
The content header of the message.
public readonly IReadOnlyBasicProperties BasicProperties
Field Value
Body
The message body as a sequence of bytes.
NOTE: Using this memory outside of
ReceivedAsync
requires that it be copied!
byte[] bodyCopy = eventArgs.Body.ToArray();
// bodyCopy is now safe to use elsewhere
public readonly ReadOnlyMemory<byte> Body
Field Value
ConsumerTag
The consumer tag of the consumer that the message was delivered to.
public readonly string ConsumerTag
Field Value
DeliveryTag
The delivery tag for this delivery. See IChannel.BasicAck.
public readonly ulong DeliveryTag
Field Value
Exchange
The exchange the message was originally published to.
public readonly string Exchange
Field Value
Redelivered
The AMQP "redelivered" flag.
public readonly bool Redelivered
Field Value
RoutingKey
The routing key used when the message was originally published.
public readonly string RoutingKey