I am trying to synchronize three microservices I have.
In order to do so I've implemented RabbitMQ. It seems as if things currently work but I am not sure if Iām following best practice and I couldn't find a reference to look it up, maybe someone could help me with that?
Brief of what I am trying to do: I have one service who should update the two others, each of the services should receive the message sent. I have two types of messages (save and delete resource). * In case of fault the queue should recover and resend the messages.
What I am currently doing: I've set up an exchange and each of my consumers connect to two different queues, one for each type of message (save/delete). I've used a direct exchange in order to filter the messages later on, even though currently I don't need to filter them.
Each of the queues are named, and the exchange as well as the messages are durable and I'am acking the messages I've consumed.
The question Should I set a different queue for each type of event or should I send the messages on the same queue and filter them? Is the use of RabbitMQ described above is the correct solution for the problem. What is the best practice?