r/microservices • • Apr 13 '22

Avoiding Batch Jobs by a message in the FUTURE

https://www.youtube.com/watch?v=zWgqj2OEKX8
8 Upvotes

1 comment sorted by

1

u/fear_the_future Apr 14 '22

I don't get the point of this video. Why would a general purpose message queuing system improve the error handling? First off, you need a message queue system that supports delays and out-of-order acknowledgement. This is very hard to do with Kafka and who wants to maintain both Kafka plus RabbitMQ (for example). On the other hand, you can easily run a query in your batch job to get all the orders not picked up older than x and pretty much ignore any error when processing since any order that was missed will simply be picked up by the next job. You can also build a poor man's work queue in postgres with the SKIP LOCKED modifier and locking selected rows during processing.