Skip to content

Configure Channels (v7)

ServiceBus.Core.Rabbit.V7 uses RabbitMQ.Client v7.

The primary channel abstraction is:

IChannel

Create Channel

await using var channel =
    await connection.CreateChannelAsync();

Purpose

The channel is responsible for:

  • publishing;
  • consuming;
  • exchange operations;
  • queue operations;
  • acknowledgements.
graph LR

    IChannel --> Publisher

    IChannel --> Subscriber

    IChannel --> RabbitMQ

Recommended Lifetime

The same principles used for v6 apply to v7.

graph LR

    Connection --> ChannelA

    Connection --> ChannelB

    Connection --> ChannelC

Use long-lived connections and create channels according to workload requirements.


Migration Notes

The most visible change when moving from v6 is:

IModel

becomes:

IChannel

ServiceBus.Core keeps the programming model largely unchanged.