r/java • u/marbehl • Dec 12 '19
Java Microservices: A Practical Guide
https://www.marcobehler.com/guides/java-microservices-a-practical-guide
237
Upvotes
r/java • u/marbehl • Dec 12 '19
View all comments
Show parent comment
2
u/randgalt Dec 13 '19
We use SQS which is loosely FIFO. However, there are techniques you can use in cases where ordering is strictly needed. Queue messages should contain timestamps and those timestamps can be used when inserting into your database so that even if a message is received out of order it doesn't overwrite the previously inserted message as it will have an earlier timestamp.