Reference application using two applications connected to different RabbitMq Services and communicating through rabbit's federation plugin.
- Run Rabbit MQ:
docker-compose -p RabbitMq.Federation.Tests up -d
- Connect to the second Docker container
docker container exec -it federation-datacenter-2 bin/bash
- Inside the container create the Federation Upstream:
rabbitmqctl set_parameter federation-upstream datacenter1 \
'{"uri":"amqp://rabbitmq-datacenter1","expires":3600000}'
- Inside the container create the Federation Policy:
rabbitmqctl set_policy --apply-to exchanges outbox-federation "outbound$" '{"federation-upstream-set":"all"}'
- Run the application with Datacenter 1 Configuration in VS (launchSettings.json) to produce messages and with Datacenter 2 to consume them.