0

I've spent quite a bit of time trying to figure out whether I should use the RabbitMQ federation plugin or shovel.

Basically I have two microservices. I want one of them to send a message to another. Each microservice has a different rabbitMQ cluster, so I need to use Federation/shovel.

I read this post When to use RabbitMQ shovels and when Federation plugin? and still couldn't figure it out / make a decision.

I want to satisfy the following:

  1. Loose coupling
  2. Microservices don't know about each other -- I.e the first microservice emits a message saying "i'm done doing x". And the second microservice just listens to that 'event' and acts accordingly..
  3. In the future I 'might' want to add more microservices, each with their own rabbitMQ cluster / vhost.

Based on this information - what do you recommend, shovel or federation?

Asool
  • 13,031
  • 7
  • 35
  • 49

1 Answers1

0

Why not just have one cluster for everything? RabbitMQ is build for handling 10k+ exchanges and queues, actually there is no upper limit except memory or disk space. Setting up a cluster for each microservice is too much work and creates unnecessary overhead. Using vhost should also not be used for this, but for each business area.

I'm only using shovels and I use them to transfer messages from my production environment to test, so I can test with real data. It's very easy to setup with scripts. And yes, you should only do this with scripts. Using the UI is too slow.

I know this doesn't answer your question directly, but I hope it has given you some food for thought.

Happy messaging!

Paw Baltzersen
  • 2,662
  • 3
  • 24
  • 33