Package-level declarations

Functions

Link copied to clipboard

Util function to create a MessageAcknowledgment from a Message and an Acknowledgment.

Link copied to clipboard
fun SqsAsyncClient.acknowledgmentMessageFlow(upstream: Flow<MessageAcknowledgment<out Acknowledgment>>, concurrency: Int = 1, groupStrategy: GroupStrategy = GroupStrategy.TimeWindow(10, 250.milliseconds), queueUrl: suspend () -> String): Flow<AcknowledgmentResult<SdkResponse>>

Creates a flow that processes acknowledgments for messages in an Amazon Simple Queue Service (SQS) queue.

Link copied to clipboard
fun SqsAsyncClient.changeMessageVisibilityFlow(upstream: Flow<MessageAcknowledgment<Acknowledgment.ChangeMessageVisibility>>, concurrency: Int = 1, groupStrategy: GroupStrategy = GroupStrategy.TimeWindow(10, 250.milliseconds), queueUrl: suspend () -> String): Flow<Pair<MessageAcknowledgment<Acknowledgment.ChangeMessageVisibility>, ChangeMessageVisibilityBatchResponse>>

Creates a flow that changes the visibility of messages in an Amazon Simple Queue Service (SQS) queue.

Link copied to clipboard
fun SqsAsyncClient.deleteMessagesFlow(upstream: Flow<MessageAcknowledgment<Acknowledgment.Delete>>, concurrency: Int = 1, groupStrategy: GroupStrategy = GroupStrategy.TimeWindow(10, 250.milliseconds), queueUrl: suspend () -> String): Flow<Pair<MessageAcknowledgment<Acknowledgment.Delete>, DeleteMessageBatchResponse>>

Creates a flow that deletes messages from an Amazon Simple Queue Service (SQS) queue.

Link copied to clipboard
suspend fun SqsAsyncClient.getQueueUrlByName(name: String): String

Retrieves the queue URL for the specified queue name by making an asynchronous request to the Amazon SQS service.

Link copied to clipboard
fun SqsAsyncClient.onMessage(queueName: String, concurrency: Int = 1, receiveConfiguration: ReceiveConfiguration.() -> Unit = {}, commitConfiguration: CommitConfiguration.() -> Unit = {}, onError: OnError = OnError.Retry(250.milliseconds), onMessage: suspend (Message) -> MessageAcknowledgment<Acknowledgment>): Job

This function is a high-level abstraction that combines receiving messages, processing them, and sending acknowledgments. It is built on top of the receiveMessagesAsFlow and acknowledgmentMessageFlow functions.

Link copied to clipboard
fun SqsAsyncClient.onMessages(queueName: String, concurrency: Int = 1, groupStrategy: GroupStrategy = GroupStrategy.TimeWindow(10, 250.milliseconds), receiveConfiguration: ReceiveConfiguration.() -> Unit = {}, commitConfiguration: CommitConfiguration.() -> Unit = {}, onError: OnError = OnError.Retry(250.milliseconds), onMessages: suspend (List<Message>) -> List<MessageAcknowledgment<Acknowledgment>>): Job

This function is a high-level abstraction that combines receiving messages, processing them, and sending acknowledgments. It is built on top of the receiveMessagesAsFlow and acknowledgmentMessageFlow functions.

Link copied to clipboard
fun SqsAsyncClient.receiveMessagesAsFlow(concurrency: ConcurrencyStrategy = ConcurrencyStrategy.disabled, stopOnEmptyList: Boolean = false, builder: suspend ReceiveMessageRequestBuilder.() -> Unit): Flow<Message>

Continuously receives messages from an Amazon Simple Queue Service (SQS) queue using the provided SqsAsyncClient. The received messages are returned as a Flow of Message objects.

Link copied to clipboard
fun SqsAsyncClient.sendMessageFlow(upstream: Flow<SendMessageRequest>, concurrency: Int = 1, groupStrategy: GroupStrategy = GroupStrategy.TimeWindow(10, 250.milliseconds), queueUrl: suspend () -> String): Flow<SendMessageResponse>

Sends messages to an Amazon Simple Queue Service (SQS) queue using the provided SqsAsyncClient. Messages are consumed from an upstream Flow of SendMessageRequest objects.