Table of Contents

Class RabbitMqPublishMessage

Namespace
Pipelinez.RabbitMQ.Destination
Assembly
Pipelinez.RabbitMQ.dll

Describes a RabbitMQ message to publish.

public sealed class RabbitMqPublishMessage
Inheritance
RabbitMqPublishMessage
Inherited Members

Properties

Body

Gets or sets the message body.

public ReadOnlyMemory<byte> Body { get; init; }

Property Value

ReadOnlyMemory<byte>

Exchange

Gets or sets an optional exchange override. When omitted, destination options provide the exchange.

public string? Exchange { get; init; }

Property Value

string

Mandatory

Gets or sets an optional mandatory flag override.

public bool? Mandatory { get; init; }

Property Value

bool?

Properties

Gets or sets the RabbitMQ basic properties to publish.

public BasicProperties? Properties { get; init; }

Property Value

BasicProperties

RoutingKey

Gets or sets an optional routing-key override. When omitted, destination options provide the routing key.

public string? RoutingKey { get; init; }

Property Value

string

Methods

Create(ReadOnlyMemory<byte>, string?, string?, BasicProperties?, bool?)

Creates a publish message with the supplied body and optional routing information.

public static RabbitMqPublishMessage Create(ReadOnlyMemory<byte> body, string? exchange = null, string? routingKey = null, BasicProperties? properties = null, bool? mandatory = null)

Parameters

body ReadOnlyMemory<byte>

The message body.

exchange string

The optional exchange override.

routingKey string

The optional routing-key override.

properties BasicProperties

The optional message properties.

mandatory bool?

The optional mandatory flag override.

Returns

RabbitMqPublishMessage

The publish message.