Need to change activemq.xml file which is in docker image

Hi,

Iam trying to run two activemqs on docker as one of two is primary and the
other is secondary. I need to link them both to communicate each other with
network connectors which exists in activemq.xml file and that can be done by knowing primary hostname which i would not get during docker image build .so, I need to give hostname while running the secondary activemq image.

Is there any way to change activemq.xml file on image by using Kubernetes.?

Your best bet would be to change the file in a new docker image. Without being able to do that you could use a volume and mount in your changes.

I’m sure (most of) the configuration can be set by environment variables. Have you looked into this?

1 Like

One other option would be to use a StatefulSet since their pod identity is predictable. rabbitmq-0 could be primary with rabbitmq-1 could be secondary.

1 Like

Thank you for your input guys,

I haven’t tried these options. I will go through these options and i ll update soon.

Thanks.