Skip to content

RabbitMQ.Client v6

ServiceBus.Core.Rabbit targets RabbitMQ.Client v6.

The main RabbitMQ channel abstraction is:

IModel

Package

dotnet add package ServiceBus.Core.Rabbit

Channel Creation

var channel = connection.CreateModel();

IModel is passed to bound clients such as publishers and subscribers.

graph LR
    IConnection --> IModel
    IModel --> Publisher
    IModel --> Subscriber

Publisher Construction

var publisher = new PublisherBound(
    descriptor,
    formatter,
    channel);

Subscriber Construction

var subscriber = new SubscriberBound<OrderCreated>(
    descriptor,
    formatter,
    channel);

Descriptor Compatibility

The descriptor model is conceptually the same as the v7 provider.

You should not duplicate topology configuration only because the RabbitMQ.Client version changes.


When To Use

Use the v6 provider when:

  • your application already depends on RabbitMQ.Client v6;
  • migration to v7 is not planned yet;
  • existing infrastructure and code are stable.