Table of Contents

Class ExchangeEndPoint

Namespace
CarrotMQ.Core.EndPoints
Assembly
CarrotMQ.Core.dll

Represents an abstract class for exchange endpoints.

public abstract class ExchangeEndPoint : EndPointBase
Inheritance
ExchangeEndPoint
Inherited Members

Constructors

ExchangeEndPoint(string)

Initializes a new instance of the ExchangeEndPoint class with the specified exchange name.

protected ExchangeEndPoint(string exchangeName)

Parameters

exchangeName string

The name of the messaging exchange acting as endpoint.

Exceptions

ArgumentException

Thrown when exchangeName is empty or whitespace.

Methods

GetRoutingKey<TMessage>(IRoutingKeyResolver)

Gets the routing key for a specified message using the provided IRoutingKeyResolver.

public override string GetRoutingKey<TMessage>(IRoutingKeyResolver routingKeyResolver)

Parameters

routingKeyResolver IRoutingKeyResolver

The resolver used to determine the routing key.

Returns

string

The routing key for the specified message.

Type Parameters

TMessage

The type of the message for which the routing key is generated.