Interface ICarrotMessageBuilder
- Namespace
- CarrotMQ.Core.MessageSending
- Assembly
- CarrotMQ.Core.dll
Creates a CarrotMessage from the strongly typed message. It also invokes the IMessageEnrichers. The resulting messages are ready to be passed to the ITransport for sending.
public interface ICarrotMessageBuilder
Methods
BuildCarrotMessageAsync<TEvent>(ICustomRoutingEvent<TEvent>, Context?, MessageProperties?, CancellationToken)
Creates a CarrotMessage from the strongly typed message. It also invokes the IMessageEnrichers. The resulting messages are ready to be passed to the ITransport for sending.
Task<CarrotMessage> BuildCarrotMessageAsync<TEvent>(ICustomRoutingEvent<TEvent> @event, Context? context, MessageProperties? messageProperties, CancellationToken cancellationToken) where TEvent : ICustomRoutingEvent<TEvent>
Parameters
eventICustomRoutingEvent<TEvent>contextContextmessagePropertiesMessageProperties?cancellationTokenCancellationToken
Returns
Type Parameters
TEvent
BuildCarrotMessageAsync<TEvent, TExchangeEndPoint>(IEvent<TEvent, TExchangeEndPoint>, Context?, MessageProperties?, CancellationToken)
Creates a CarrotMessage from the strongly typed message. It also invokes the IMessageEnrichers. The resulting messages are ready to be passed to the ITransport for sending.
Task<CarrotMessage> BuildCarrotMessageAsync<TEvent, TExchangeEndPoint>(IEvent<TEvent, TExchangeEndPoint> @event, Context? context, MessageProperties? messageProperties, CancellationToken cancellationToken) where TEvent : IEvent<TEvent, TExchangeEndPoint> where TExchangeEndPoint : ExchangeEndPoint, new()
Parameters
eventIEvent<TEvent, TExchangeEndPoint>contextContextmessagePropertiesMessageProperties?cancellationTokenCancellationToken
Returns
Type Parameters
TEventTExchangeEndPoint
BuildCarrotMessageAsync<TCommand, TResponse, TEndPointDefinition>(ICommand<TCommand, TResponse, TEndPointDefinition>, Context?, MessageProperties?, CancellationToken)
Creates a CarrotMessage from the strongly typed message. It also invokes the IMessageEnrichers. The resulting messages are ready to be passed to the ITransport for sending.
Task<CarrotMessage> BuildCarrotMessageAsync<TCommand, TResponse, TEndPointDefinition>(ICommand<TCommand, TResponse, TEndPointDefinition> request, Context? context, MessageProperties? messageProperties, CancellationToken cancellationToken) where TCommand : ICommand<TCommand, TResponse, TEndPointDefinition> where TResponse : class where TEndPointDefinition : EndPointBase, new()
Parameters
requestICommand<TCommand, TResponse, TEndPointDefinition>contextContextmessagePropertiesMessageProperties?cancellationTokenCancellationToken
Returns
Type Parameters
TCommandTResponseTEndPointDefinition
BuildCarrotMessageAsync<TCommand, TResponse, TEndPointDefinition>(ICommand<TCommand, TResponse, TEndPointDefinition>, ReplyEndPointBase?, Context?, MessageProperties?, Guid?, CancellationToken)
Creates a CarrotMessage from the strongly typed message. It also invokes the IMessageEnrichers. The resulting messages are ready to be passed to the ITransport for sending.
Task<CarrotMessage> BuildCarrotMessageAsync<TCommand, TResponse, TEndPointDefinition>(ICommand<TCommand, TResponse, TEndPointDefinition> command, ReplyEndPointBase? replyEndPoint, Context? context, MessageProperties? messageProperties, Guid? correlationId, CancellationToken cancellationToken) where TCommand : ICommand<TCommand, TResponse, TEndPointDefinition> where TResponse : class where TEndPointDefinition : EndPointBase, new()
Parameters
commandICommand<TCommand, TResponse, TEndPointDefinition>replyEndPointReplyEndPointBasecontextContextmessagePropertiesMessageProperties?correlationIdGuid?cancellationTokenCancellationToken
Returns
Type Parameters
TCommandTResponseTEndPointDefinition
BuildCarrotMessageAsync<TQuery, TResponse, TEndPointDefinition>(IQuery<TQuery, TResponse, TEndPointDefinition>, Context?, MessageProperties?, CancellationToken)
Creates a CarrotMessage from the strongly typed message. It also invokes the IMessageEnrichers. The resulting messages are ready to be passed to the ITransport for sending.
Task<CarrotMessage> BuildCarrotMessageAsync<TQuery, TResponse, TEndPointDefinition>(IQuery<TQuery, TResponse, TEndPointDefinition> request, Context? context, MessageProperties? messageProperties, CancellationToken cancellationToken) where TQuery : IQuery<TQuery, TResponse, TEndPointDefinition> where TResponse : class where TEndPointDefinition : EndPointBase, new()
Parameters
requestIQuery<TQuery, TResponse, TEndPointDefinition>contextContextmessagePropertiesMessageProperties?cancellationTokenCancellationToken
Returns
Type Parameters
TQueryTResponseTEndPointDefinition
BuildCarrotMessageAsync<TQuery, TResponse, TEndPointDefinition>(IQuery<TQuery, TResponse, TEndPointDefinition>, ReplyEndPointBase, Context?, MessageProperties?, Guid?, CancellationToken)
Creates a CarrotMessage from the strongly typed message. It also invokes the IMessageEnrichers. The resulting messages are ready to be passed to the ITransport for sending.
Task<CarrotMessage> BuildCarrotMessageAsync<TQuery, TResponse, TEndPointDefinition>(IQuery<TQuery, TResponse, TEndPointDefinition> query, ReplyEndPointBase replyEndPoint, Context? context, MessageProperties? messageProperties, Guid? correlationId, CancellationToken cancellationToken) where TQuery : IQuery<TQuery, TResponse, TEndPointDefinition> where TResponse : class where TEndPointDefinition : EndPointBase, new()
Parameters
queryIQuery<TQuery, TResponse, TEndPointDefinition>replyEndPointReplyEndPointBasecontextContextmessagePropertiesMessageProperties?correlationIdGuid?cancellationTokenCancellationToken
Returns
Type Parameters
TQueryTResponseTEndPointDefinition