Table of Contents

Class BasicDeliverEventArgs

Namespace
RabbitMQ.Client.Events
Assembly
RabbitMQ.Client.dll

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 string
deliveryTag ulong
redelivered bool
exchange string
routingKey string
properties IReadOnlyBasicProperties
body ReadOnlyMemory<byte>
cancellationToken CancellationToken

Fields

BasicProperties

The content header of the message.

public readonly IReadOnlyBasicProperties BasicProperties

Field Value

IReadOnlyBasicProperties

Body

The message body as a sequence of bytes.

NOTE: Using this memory outside of ReceivedAsync requires that it be copied! This shows how to copy the data for use:

byte[] bodyCopy = eventArgs.Body.ToArray();
   // bodyCopy is now safe to use elsewhere

public readonly ReadOnlyMemory<byte> Body

Field Value

ReadOnlyMemory<byte>

ConsumerTag

The consumer tag of the consumer that the message was delivered to.

public readonly string ConsumerTag

Field Value

string

DeliveryTag

The delivery tag for this delivery. See IChannel.BasicAck.

public readonly ulong DeliveryTag

Field Value

ulong

Exchange

The exchange the message was originally published to.

public readonly string Exchange

Field Value

string

Redelivered

The AMQP "redelivered" flag.

public readonly bool Redelivered

Field Value

bool

RoutingKey

The routing key used when the message was originally published.

public readonly string RoutingKey

Field Value

string