Interface IProducerTemplate
Client API for sending messages to endpoints programmatically, outside of route pipelines.
Must be started before use via . Supports fire-and-forget, request/reply,
and processor-based send patterns. Thread-safe after is called.
public interface IProducerTemplate
Properties
Methods
RequestAsync(IEndpoint, IExchange, CancellationToken)
Sends a pre-built exchange with and returns the same
Task<IExchange> RequestAsync(IEndpoint endpoint, IExchange exchange, CancellationToken cancellationToken = default)
RequestAsync(string, IExchange, CancellationToken)
Sends a pre-built, caller-owned exchange (InOut) by URI and returns it once is populated.
Task<IExchange> RequestAsync(string endpointUri, IExchange exchange, CancellationToken cancellationToken = default)
RequestBody(IEndpoint, IMessage, CancellationToken)
Sends an explicit as the request and waits for the reply body.
Task<object?> RequestBody(IEndpoint endpoint, IMessage message, CancellationToken cancellationToken = default)
RequestBody(IEndpoint, object, CancellationToken)
Sends a request and waits for the reply body asynchronously.
Task<object?> RequestBody(IEndpoint endpoint, object body, CancellationToken cancellationToken = default)
RequestBody(string, IMessage, CancellationToken)
Sends an explicit by URI and waits for the reply body.
Task<object?> RequestBody(string endpointUri, IMessage message, CancellationToken cancellationToken = default)
RequestBody(string, object, CancellationToken)
Sends a request by URI and waits for the reply body asynchronously.
Task<object?> RequestBody(string endpointUri, object body, CancellationToken cancellationToken = default)
RequestBody<T>(IEndpoint, object, CancellationToken)
Sends a request and returns the reply body cast to T.
Task<T?> RequestBody<T>(IEndpoint endpoint, object body, CancellationToken cancellationToken = default)
RequestBody<T>(string, object, CancellationToken)
Sends a request by URI and returns the reply body cast to T.
Task<T?> RequestBody<T>(string endpointUri, object body, CancellationToken cancellationToken = default)
Send(IEndpoint, IExchange)
Sends a pre-built exchange to the specified endpoint.
void Send(IEndpoint endpoint, IExchange exchange)
Send(IEndpoint, IMessage)
Sends a message to the specified endpoint.
void Send(IEndpoint endpoint, IMessage message)
Send(IEndpoint, IProcessor)
Applies a processor to an exchange and sends it to the endpoint.
void Send(IEndpoint endpoint, IProcessor processor)
Send(IEndpoint, object)
Sends a message body to the specified endpoint.
void Send(IEndpoint endpoint, object body)
Send(string, IExchange)
Sends a pre-built exchange to the endpoint resolved from URI.
void Send(string endpointUri, IExchange exchange)
Send(string, IMessage)
Sends a message to the endpoint resolved from URI.
void Send(string endpointUri, IMessage message)
Send(string, object)
Sends a message body to the specified endpoint URI.
void Send(string endpointUri, object body)
SendAsync(IEndpoint, IExchange, CancellationToken)
Asynchronously sends a pre-built exchange to the endpoint.
Task SendAsync(IEndpoint endpoint, IExchange exchange, CancellationToken cancellationToken = default)
SendAsync(IEndpoint, IMessage)
Asynchronously sends a message to the endpoint.
Task SendAsync(IEndpoint endpoint, IMessage message)
SendAsync(IEndpoint, object)
Asynchronously sends a message body to the endpoint.
Task SendAsync(IEndpoint endpoint, object body)
SendAsync(string, IExchange, CancellationToken)
Asynchronously sends a pre-built, caller-owned exchange to the endpoint resolved from URI.
Task SendAsync(string endpointUri, IExchange exchange, CancellationToken cancellationToken = default)
SendAsync(string, IMessage)
Asynchronously sends a message to the endpoint URI.
Task SendAsync(string endpointUri, IMessage message)
SendAsync(string, object)
Asynchronously sends a message body to the endpoint URI.
Task SendAsync(string endpointUri, object body)