Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
set -m
docker-entrypoint.sh rabbitmq-server &
# This is a temporary solution, please see https://www.rabbitmq.com/configure.html
echo "Waiting on RabbitMQ to start"
sleep 20
echo "Setting Federation policy"
rabbitmqctl set_policy federate-me '^out$' '{"federation-upstream-set":"all"}'
while [ $? -ne 0 ]; do
sleep 2
rabbitmqctl set_policy federate-me '^out$' '{"federation-upstream-set":"all"}'
done
echo "Adding default queues"
rabbitmqadmin declare queue name=rejected durable=true
rabbitmqadmin declare queue name=out durable=true 'arguments={"x-dead-letter-exchange":"", "x-dead-letter-routing-key":"rejected"}'
rabbitmqadmin declare queue name=callback durable=true 'arguments={"x-dead-letter-exchange":"", "x-dead-letter-routing-key":"rejected"}'
rabbitmqadmin declare ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.