changeMessageVisibilityFlow

fun <Error class: unknown class>.changeMessageVisibilityFlow(queue: SqsQueue, upstream: Flow<MessageAcknowledgment<Acknowledgment.ChangeMessageVisibility>>, concurrency: Int = 1, groupStrategy: GroupStrategy = GroupStrategy.TimeWindow(10, 250.milliseconds)): Flow<ChangeMessageVisibilityResult>

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

This function takes an upstream flow of MessageAcknowledgment objects and processes them concurrently using concurrency and the specified groupStrategy.

Return

A Flow of ChangeMessageVisibilityResult, representing the outcome of each operation attempt: * Success: Indicates successful change message visibility operation. * Failure: Indicates a failed change message visibility operation.

Example usage:

val sqsClient = SqsClient {  }

val acknowledgmentsFlow: Flow<MessageAcknowledgment<ChangeMessageVisibility>> = // ... create a flow

val resultFlow =
sqsClient
.changeMessageVisibilityFlow(acknowledgmentsFlow) {
sqsClient.getQueueUrlByName("myqueue")
}

resultFlow.collect { (acknowledgment, response) ->
// Process the acknowledgment and response
}

Parameters

queue

The SqsQueue representing the target SQS queue.

upstream

A Flow of MessageAcknowledgment objects.

concurrency

The level of concurrency for processing messages.

groupStrategy

The strategy to use when chunking messages for processing.