akka / alpakka

Alpakka is a Reactive Enterprise Integration library for Java and Scala, based on Reactive Streams and Akka.
https://doc.akka.io/docs/alpakka/current/
Other
1.26k stars 645 forks source link

AWS SQS: Make MessageAction independent of Message #1997

Open julianhowarth opened 4 years ago

julianhowarth commented 4 years ago

Short description

Currently a MessageAction is created by supplying a Message which means that any flow doing acknowledgement needs to keep track of the underlying message. It may simplify some flows to be able to discard the original Message.

Details

As far as I can tell, the only component of the message that is actually required when the MessageAction is actually used is the receiptHandle. By only requiring the handle, there would be no need to keep track of the original message, instead just the handle would need to be tracked.

Current behaviour could be maintained by extracting the receiptHandle when constructing the MessageAction. Additional constructors could then accept a receipt handle directly.

gabfssilva commented 4 years ago

I guess we could use SourceWithContext in this case, then we don't need to carry anything at all.