Interface ICustomRoutingEvent<TEvent>
Represents an event interface that defines the contract for handling a specific event with custom routing information.
public interface ICustomRoutingEvent<TEvent> : _IMessage<TEvent, NoResponse> where TEvent : ICustomRoutingEvent<TEvent>
Type Parameters
TEventThe type of the custom routing event.
Examples
Example of an event definition:
public class MyCustomRoutingEvent : ICustomRoutingEvent<MyCustomRoutingEvent>
{
public MyCustomRoutingEvent(string exchange, string routingKey, string eventData)
{
EventData = eventData;
Exchange = exchange;
RoutingKey = routingKey;
}
public string EventData { get; set; }
public string Exchange { get; set; }
public string RoutingKey { get; set; }
}
Properties
Exchange
Exchange where the event will be sent to
string Exchange { get; set; }
Property Value
RoutingKey
Routing key used by RabbitMQ to route the message to the right queue
string RoutingKey { get; set; }
Property Value
See Also
_IEvent<TEvent>