Integration / RabbitMQ Interview Questions
What is the difference between federation and shovel in RabbitMQ?
Federation and shovel both move messages between separate RabbitMQ brokers, but they target different problems.
| Federation | Shovel |
| Links exchanges (or queues) across brokers while preserving routing topology. | Moves messages point-to-point from a source queue/exchange to a destination, without preserving full topology. |
| Good for ongoing, bidirectional-feeling event distribution across sites/regions. | Good for simple, often one-directional, bulk or continuous transfer - e.g. migrations or bridging. |
| Configured as a federation link with upstream/downstream policies. | Configured as an explicit source-to-destination shovel. |
| More setup, but preserves richer routing semantics. | Simpler to reason about, but topology-agnostic. |
A rule of thumb: reach for federation when multiple sites need to stay in sync on an ongoing basis with routing preserved, and reach for shovel when you just need to reliably move messages from point A to point B.
More Related questions...