PublisherBoundDescriptor¶
PublisherBoundDescriptor is the primary descriptor used to configure publisher topology and runtime behavior.
It describes:
- exchanges;
- queue topology;
- exchange chains;
- publish retry behavior;
- delivery confirmation behavior;
- channel event monitoring.
Purpose¶
A publisher descriptor defines where messages are published and how the publishing pipeline behaves.
graph LR
PublisherBoundDescriptor --> Publisher
Publisher --> RabbitMQ
High-Level Model¶
classDiagram
class PublisherBoundDescriptor
class ExchangeBoundDescriptor
class PubRetryPolicyDescriptor
class DeliveryConfirmation
PublisherBoundDescriptor --> ExchangeBoundDescriptor
PublisherBoundDescriptor --> PubRetryPolicyDescriptor
PublisherBoundDescriptor --> DeliveryConfirmation
Properties¶
| Property | Description |
|---|---|
| Exchanges | Root exchanges declared by the publisher. |
| RetryPolicy | Publish retry configuration. |
| Confirmation | Publisher confirmation configuration. |
| EnableChannelEvents | Enables RabbitMQ channel events. |
Exchange Topology¶
The publisher topology starts from one or more root exchanges.
new PublisherBoundDescriptor
{
Exchanges =
{
new ExchangeBoundDescriptor
{
Name = "orders",
Type = ExchangeTypes.Direct
}
}
};
Retry Policy¶
Publish retry behavior can be configured through:
RetryPolicy = new PubRetryPolicyDescriptor()
The retry descriptor is documented in:
Retry And Delivery Descriptors
Delivery Confirmation¶
Publisher acknowledgements can be enabled through:
Confirmation = new DeliveryConfirmation()
The delivery descriptor is documented in:
Retry And Delivery Descriptors
Channel Events¶
RabbitMQ channel events can be enabled.
EnableChannelEvents = true
Applications can then subscribe to:
publisher.OnChannelEventFired
See:
How To / Publishing / Channel Events
Runtime Behavior¶
graph TD
Descriptor
Exchanges
Publisher
RabbitMQ
Descriptor --> Exchanges
Exchanges --> Publisher
Publisher --> RabbitMQ
The provider traverses the topology and creates the required RabbitMQ objects.
Related Descriptors¶
- ExchangeBoundDescriptor
- PubRetryPolicyDescriptor
- DeliveryConfirmation
- BinderDescriptor