Page MenuHomeDevCentral

Link notifications exchange → wearg-notifications queue on White Rabbit broker
Closed, ResolvedPublic

Description

Currently, if we destroy the container and restore the RabbitMQ definitions, we have the queue, but not the binding.

We have three options here:

  • Dæghrefn could create a temporary queue instead
  • Dæghrefn could take care to recreate the queue
  • We could run a script to configure the broker at container run

Event Timeline

/usr/local/etc/run-mq
#!/bin/sh

NAME=white-rabbit

PORTS="-p 5672:5672 -p 25672:25672 -p 1883:1883 -p 8883:8883 -p 15672:15672 -p 15674:15674 -p 61613:61613 -p 4369:4369"
VOLUMES="-v /data/$NAME/log:/data/log -v /data/$NAME/mnesia:/data/mnesia"

docker run -dt $PORTS $VOLUMES --hostname ${NAME} --name ${NAME} nasqueron/rabbitmq

# Configuration
rabbitmqadmin --vhost=dev declare exchange name=notifications type=topic                                                                                       
rabbitmqadmin --vhost=dev declare queue name=wearg-notifications
rabbitmqadmin --vhost=dev declare binding source="notifications" destination_type="queue" destination="wearg-notifications" routing_key='#'