Skip to content

Deprecated APIs

This page lists APIs that are still visible for compatibility but should not be used for new code.

Deprecated APIs are documented only to help migration.


BrokerDescriptor

BrokerDescriptor is deprecated.

Use the current bound descriptor model instead.

[Obsolete]
public class BrokerDescriptor : IBrokerDescriptor
{
}

The current contract shared by descriptor implementations is:

public interface IBrokerDescriptor
{
    bool EnableChannelEvents { get; }
}

Legacy Client Descriptors

Legacy descriptors should be replaced with the bound descriptor model.

Deprecated API Replacement
BrokerDescriptor IBrokerDescriptor with bound descriptors.
PublisherDescriptor PublisherBoundDescriptor
SubscriberDescriptor SubscriberBoundDescriptor
RestPublisherDescriptor RestPublisherBoundDescriptor
RestBrokerDescriptor RestBrokerBoundDescriptor

Legacy Subscriber Clients

Legacy subscriber implementations should be replaced with bound subscribers.

Deprecated API Replacement
CommonSubscriber<TData> SubscriberBound<TData>
BinderSubscriber<TData> SubscriberBound<TData>

Deprecated Rest Subscriber Property

RestSubscriberBoundDescriptor.AutoAck is obsolete.

Acknowledgement-based processing should be preferred.

[Obsolete]
public bool AutoAck { get; set; }

Migration Guidance

Prefer the current descriptor model:

var descriptor = new PublisherBoundDescriptor
{
    Exchanges =
    {
        new ExchangeBoundDescriptor
        {
            Name = "orders",
            Type = ExchangeTypes.Direct,
            Durable = true
        }
    }
};

and:

var descriptor = new SubscriberBoundDescriptor
{
    Queue = new QueueDescriptor
    {
        Name = "orders.created",
        Durable = true
    },

    Exchange = new ExchangeDescriptor
    {
        Name = "orders",
        Type = ExchangeTypes.Direct,
        Durable = true
    },

    Binder = new BinderDescriptor
    {
        RoutingKey = "orders.created"
    }
};

Recommendation

Do not introduce deprecated APIs in new code.

Use:

  • PublisherBoundDescriptor;
  • SubscriberBoundDescriptor;
  • ExchangeBoundDescriptor;
  • QueueBoundDescriptor;
  • BinderDescriptor;
  • RetryPolicyDescriptor;
  • DeliveryConfirmation.

These are the descriptors used by the current RabbitMQ bound clients.