Configure Channels (v6)¶
ServiceBus.Core.Rabbit uses RabbitMQ.Client v6.
The primary channel abstraction is:
IModel
Create Channel¶
var channel =
connection.CreateModel();
Purpose¶
The channel is responsible for:
- publishing;
- consuming;
- exchange operations;
- queue operations;
- acknowledgements.
graph LR
IModel --> Publisher
IModel --> Subscriber
IModel --> RabbitMQ
Recommended Lifetime¶
Channels are lightweight and may be created as needed.
However, excessive channel creation should be avoided.
graph LR
Connection --> ChannelA
Connection --> ChannelB
Connection --> ChannelC
Next Step¶
After creating the channel, configure:
- formatter;
- descriptors;
- publisher or subscriber.