Class ExchangeAttribute
Specifies that a message should be published to a specific exchange, or that a handler should consume from a specific exchange. Can be applied multiple times for complex routing topologies.
Inherited Members
Namespace: Chapar.Core.Attributes
Assembly: Chapar.Core.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public class ExchangeAttribute : Attribute
Constructors
| Edit this page View SourceExchangeAttribute(string)
Initializes a new instance of the ExchangeAttribute class.
Declaration
public ExchangeAttribute(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the exchange. |
Properties
| Edit this page View SourceName
The name of the exchange.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
RoutingKey
The routing key used for direct or topic exchanges.
Declaration
public string? RoutingKey { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
Type
The type of the exchange. Default is Fanout.
Declaration
public ExchangeType Type { get; init; }
Property Value
| Type | Description |
|---|---|
| ExchangeType |