acknowledgeWith
infix fun <Error class: unknown class>.acknowledgeWith(acknowledgment: Acknowledgment): <Error class: unknown class>
Util function to create a MessageAcknowledgment from a Message and an Acknowledgment.
Be aware that this function alone do not perform any operation. You must send a Flow of MessageAcknowledgment to acknowledgmentMessageFlow in order to delete or change the visibility of a message.
Return
An MessageAcknowledgment object, which is basically a tuple of Message and Acknowledgment.
Example usage:
val messageFlow: Flow<Message> = ...
messageFlow
.map { message -> message acknowledgeWith Acknowledgment.Delete }
.let { flow -> sqsClient.acknowledgmentMessageFlow(queue, flow) }
.collect(::println)
Content copied to clipboard
Parameters
acknowledgment
The acknowledgment of the received SQS Message