RabbitMqMessageOptions Class
Definition
- Namespace
- Savvyio.Extensions.RabbitMQ
- Assemblies
- Savvyio.Extensions.RabbitMQ.dll
Configuration options that is related to RabbitMQ.
public class RabbitMqMessageOptions : IValidatableParameterObject, IParameterObject
- Inheritance
-
objectRabbitMqMessageOptions
- Implements
- Derived
Examples
Configure a RabbitMqMessageOptions with the AMQP URL and message persistence settings shared by all RabbitMQ message types in Savvy I/O.
using System;
using Savvyio.Extensions.RabbitMQ;
namespace ExampleApp;
public class RabbitMqSetup
{
public static RabbitMqMessageOptions CreateOptions()
{
var options = new RabbitMqMessageOptions
{
AmqpUrl = new Uri("amqp://guest:guest@localhost:5672"),
Persistent = true
};
return options;
}
}
Constructors
| Name | Description |
|---|---|
| RabbitMqMessageOptions() | Initializes a new instance of the RabbitMqMessageOptions class with default values. |
Properties
| Name | Description |
|---|---|
| AmqpUrl | Gets or sets the AMQP URL used to connect to the RabbitMQ broker. |
| Persistent | Gets or sets a value indicating whether messages should be published as persistent. |
Methods
| Name | Description |
|---|---|
| ValidateOptions() | Determines whether the public read-write properties of this instance are in a valid state. |