RabbitMQ federation
Use Cases for RMQ
Federation:
RMQà Exchanges--à(based on some rules) Queue
I. Multiple cluster of
rabbitmq at various geographical location:
Consumer needs to listen
to central rabbitmq cluster only. If the consumer starts listening to multiple
clusters it would suffer latency problem.
II:
distributing load from one queue to multiple clusters. If the consumers are at different
locations and there is a one queue where data is being pushed.
Put the same
messages over all the clusters.
III. Migrate data
from one cluster to second cluster without any downtime
IV. Reduce
Latency for message consumption
Consume messages by
setting up local cluster where the consumer resides
Type of Federation:
Exchange
federation:
It is possible to distribute
messages to other cluster . Messages published to federate exchanges will be published
to local and downstream server as well. Mainly used when the same message you want to consume
at multiple places.
In addition, an exchange on the downstream(destination) node will receive a copy of messages that are published to the upstream node.
Federated exchanges are a similar to exchange-to-exchange bindings,
in that, they can (optionally) subscribe to a limited set of messages from an upstream exchange.
Queue Federation:
Messages would be
distributed over two clusters. Messages here are not duplicated. It is useful
to distribute load or migration of clusters.
Upstream server: where producer is pushing the data.
Downstream servr: Server where messages need to be forward. From
upstream server to the destination.
Pre-requisite:
- Two RMQ servers/cluster
- Management plugin enabled for dashboard
- Connectivity between the two clsute
server over amqp protocol on port 15672
References:
https://www.rabbitmq.com/federation-reference.html
https://www.rabbitmq.com/federated-exchanges.html
https://jasonrowe.com/2018/01/26/rabbitmq-federation-examples/
https://jee-appy.blogspot.com/2018/08/setup-rabbitmq-exchange-federation.html
https://www.youtube.com/watch?v=-ysZPO_3HF0
https://www.rabbitmq.com/federation-reference.html
https://www.rabbitmq.com/federated-exchanges.html
https://jasonrowe.com/2018/01/26/rabbitmq-federation-examples/
https://jee-appy.blogspot.com/2018/08/setup-rabbitmq-exchange-federation.html
https://www.youtube.com/watch?v=-ysZPO_3HF0
No comments:
Post a Comment