-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS SQS: Improve SqsAckResult and SqsPublishResult consistency #1336
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondered earlier why there just was the message body returned.
Wouldn't it be useful to return the whole message even with SqsPublishResult
?
You are right, I made a mistake deleting the message body from the By looking closer at the That would change the signature of a The only difference is that the |
Wouldn't that lose the information from |
Indeed, the metadata should also be propagated. Concerning the data itself, if the queue is not FIFO, If the queue is FIFO, there are additional identifiers: See here The result contains the It was not clear to me if FIFO is supported in the alpakka connector: #625. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, you went from fixing a few things to a vast improvement overall.
With this changes does Fifo work now?
sqs/src/main/scala/akka/stream/alpakka/sqs/impl/SqsBatchChangeMessageVisibilityFlowStage.scala
Outdated
Show resolved
Hide resolved
sqs/src/main/scala/akka/stream/alpakka/sqs/impl/SqsBatchChangeMessageVisibilityFlowStage.scala
Outdated
Show resolved
Hide resolved
sqs/src/main/scala/akka/stream/alpakka/sqs/impl/SqsBatchDeleteFlowStage.scala
Outdated
Show resolved
Hide resolved
@ennru I couldn't write integration tests for FIFO because elasticmq FIFO queues seem to behave like normal queues. No sequence id are generated at insert time. I've tested the code on a real SQS FIFO queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking this even further, it really gets ready for Alpakka 1.0 now.
sqs/src/main/scala/akka/stream/alpakka/sqs/SqsBatchException.scala
Outdated
Show resolved
Hide resolved
// override implicit val awsSqsClient: AmazonSQSAsync = AmazonSQSAsyncClientBuilder.standard().build() | ||
|
||
val future = | ||
//#flow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful not to duplicate the snippet markers (//#flow
).
Check the generated docs with docs/paradoxBrowse
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tip. I was using sbt docs/Local/paradox
as stated in the docs without success.
|
||
import scala.compat.java8.OptionConverters._ | ||
|
||
object MessageFactory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great you added this!
ElasticMQ doesn't support FIFO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Did you check for other duplicated snippet markers?
CompletionStage<Done> done = | ||
Source.single(action) | ||
// #ack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These #ack
s seem duplicated from line 47/52.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just moved the code down to have the setting tests before the stream tests.
Thank you, the SQS connector seems to be quite popular. |
Glad I can help :) Thank you for the good guidance |
Fixes #1313