I am trying to use the Amqp alpakka connector as a source and sink.
Source<CommittableReadResult, NotUsed> AMQP_SOURCE
-> processAndGetResponse
-> Sink<ByteString, CompletionStage<Done>> AMQP_SINK
I want to acknowledge the message obtained from the Amqp queue, after the Sink's operation is successful. like this:
amqp_source(committableReadResult)
-> processAndGetResponse
-> amqp_sink
-> IfSinkOperationSuccess.Then(committableReadResult.ack())
How can I achieve this? I basically want to mark the message as acknowledge only after the sink operation is successful.