Table of Contents

Interface ISQSPublisher

Namespace
AWS.Messaging.Publishers.SQS
Assembly
AWS.Messaging.dll

This interface allows sending messages from application code to Amazon SQS. It exposes the SendAsync<T>(T, SQSOptions?, CancellationToken) method which takes in a user-defined message, and SQSOptions to set additional parameters while sending messages to SQS. Using dependency injection, this interface is available to inject anywhere in the code.

public interface ISQSPublisher : ICommandPublisher

Methods

SendAsync<T>(T, SQSOptions?, CancellationToken)

Sends the application message to SQS.

Task<SQSSendResponse> SendAsync<T>(T message, SQSOptions? sqsOptions, CancellationToken token = default)

Parameters

message T

The application message that will be serialized and sent to an SQS queue

sqsOptions SQSOptions

Contains additional parameters that can be set while sending a message to an SQS queue

token CancellationToken

The cancellation token used to cancel the request.

Returns

Task<SQSSendResponse>

Type Parameters

T