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
Exchange
Gets or sets an optional exchange override. When omitted, destination options provide the exchange.
public string? Exchange { get; init; }
Property Value
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
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
bodyReadOnlyMemory<byte>The message body.
exchangestringThe optional exchange override.
routingKeystringThe optional routing-key override.
propertiesBasicPropertiesThe optional message properties.
mandatorybool?The optional mandatory flag override.
Returns
- RabbitMqPublishMessage
The publish message.