mardi 14 août 2018

How to guarantee message order when multiple instances update elasticsearch?

Lets say I have a Queue listening to Kafka contains realtime messages. I also have a "worker" that get the message from the Queue and perform update on Elasticsearch. When I scale my project by add more "worker" instances, how can I maintain the order of the messages? How can I avoid one "worker" instance get the later message from the queue but finish update to Elasticsearch earlier?

Aucun commentaire:

Enregistrer un commentaire