rabbitmq-swarm-cluster icon indicating copy to clipboard operation
rabbitmq-swarm-cluster copied to clipboard

Persist messages in Volume

Open drummer3333 opened this issue 4 years ago • 5 comments

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.

drummer3333 avatar Aug 12 '20 13:08 drummer3333

Hi @drummer3333,

Were you able to resolve it? Can you please share the workaround for adding persistence in this image?

devavanza avatar Dec 28 '20 12:12 devavanza

no, I'm not using rabbit cluster mode in the moment. didn't have a problem till now.

drummer3333 avatar Dec 28 '20 12:12 drummer3333

So you are using a single instance rabbitmq?

devavanza avatar Dec 28 '20 13:12 devavanza

running in docker swarm, yes.

drummer3333 avatar Dec 28 '20 13:12 drummer3333

Try hostname: "{{.Service.Name}}.{{.Task.Slot}}".

TJFG1998 avatar Jun 23 '21 11:06 TJFG1998