Table of Contents

Interface ITransport

Namespace
CarrotMQ.Core.Protocol
Assembly
CarrotMQ.Core.dll

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

message CarrotMessage

The CarrotMQ message to be sent.

cancellationToken CancellationToken

The 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

message CarrotMessage

The CarrotMQ message to be sent.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<CarrotMessage>

The received CarrotMQ message as a response.