rabbitmq-swarm-cluster
rabbitmq-swarm-cluster copied to clipboard
Persist messages in Volume
I like the concept of this, but I need to persist the messages to disk with a volume.
so I added a volume:
volumes:
- /c/volumes/rabbit:/var/lib/rabbitmq
and changed the mnesia dir to be named after each slot:
- "RABBITMQ_MNESIA_DIR=/var/lib/rabbitmq/mnesia/{{.Service.Name}}.{{.Task.Slot}}"
killing a single task is no problem. But if I restart all tasks, all tasks want to reconnect to the old peers which are not avalible anymore.
Hi @drummer3333,
Were you able to resolve it? Can you please share the workaround for adding persistence in this image?
no, I'm not using rabbit cluster mode in the moment. didn't have a problem till now.
So you are using a single instance rabbitmq?
running in docker swarm, yes.
Try hostname: "{{.Service.Name}}.{{.Task.Slot}}"
.