Interface ITransport
Represents an interface for handling the transport of CarrotMQ messages.
public interface ITransport : IDisposable, IAsyncDisposable
- Inherited Members
Remarks
Our default ITransport implementation for RabbitMQ can be found in our CarrotMQ.RabbitMQ nuget package.
Methods
SendAsync(CarrotMessage, CancellationToken)
Sends a CarrotMQ message asynchronously.
Task SendAsync(CarrotMessage message, CancellationToken cancellationToken)
Parameters
messageCarrotMessageThe CarrotMQ message to be sent.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task
A task representing the asynchronous send operation.
SendReceiveAsync(CarrotMessage, CancellationToken)
Sends a CarrotMQ message and asynchronously waits for a response.
Task<CarrotMessage> SendReceiveAsync(CarrotMessage message, CancellationToken cancellationToken)
Parameters
messageCarrotMessageThe CarrotMQ message to be sent.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<CarrotMessage>
The received CarrotMQ message as a response.