Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Persist messages in Volume #5

Open
drummer3333 opened this issue Aug 12, 2020 · 5 comments
Open

Persist messages in Volume #5

drummer3333 opened this issue Aug 12, 2020 · 5 comments

Comments

@drummer3333
Copy link

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.

@devavanza
Copy link

Hi @drummer3333,

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

@drummer3333
Copy link
Author

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

@devavanza
Copy link

So you are using a single instance rabbitmq?

@drummer3333
Copy link
Author

running in docker swarm, yes.

@TJFG1998
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants