Configuring two activemqs on docker as primary and secondary

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Configuring two activemqs on docker as primary and secondary

abhilash128
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. Earlier i use to do it by giving Hostname on VMs.

Could someone please help how to configure this using Docker



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: Configuring two activemqs on docker as primary and secondary

Jean-Baptiste Onofré
Hi,

you can use a shared volume between the two docker containers if you use
master/slave.

In the case of a network of brokers, you can't use multicast, so use
static instead with docker IP addresses.

Regards
JB

On 24/10/2018 06:58, abhilash128 wrote:

> 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. Earlier i use to do it by giving Hostname on VMs.
>
> Could someone please help how to configure this using Docker
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
Reply | Threaded
Open this post in threaded view
|

Re: Configuring two activemqs on docker as primary and secondary

Tim Bain
If you're running Docker within a management framework such as DC/OS
(Mesos), that framework might provide a DNS service in which you can
register your Docker containers, which would let you use the same
hostname-style addressing scheme you used previously.

I believe you could also use the hostname of the host that's running
Docker, with the mapped port number that Docker maps to your ActiveMQ port,
if that mapping is known in advance.

A lot depends on how you're actually using Docker, which you haven't
described. And since these questions really have nothing to do with
ActiveMQ (the question is about how to address a process running in Docker
from outside of the Docker container), if the answers you're getting here
aren't enough, you should probably post your question to either
StackOverflow or a Docker-specific mailing list (I assume there's one of
those).

Tim

On Tue, Oct 23, 2018, 11:25 PM Jean-Baptiste Onofré <[hidden email]> wrote:

> Hi,
>
> you can use a shared volume between the two docker containers if you use
> master/slave.
>
> In the case of a network of brokers, you can't use multicast, so use
> static instead with docker IP addresses.
>
> Regards
> JB
>
> On 24/10/2018 06:58, abhilash128 wrote:
> > 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. Earlier i use to do it by giving Hostname on VMs.
> >
> > Could someone please help how to configure this using Docker
> >
> >
> >
> > --
> > Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Configuring two activemqs on docker as primary and secondary

abhilash128
In reply to this post by abhilash128
Thanks for your input guys,

I posted this question on docker discussion forum as well. I got below
inputs :

1.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?

2.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.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: Configuring two activemqs on docker as primary and secondary

Tim Bain
Did the input you got from the Docker forum give you an answer that works
for you? If not, keep asking them further questions.

To me, without knowing all that much about Docker, the second option sounds
pretty straightforward on the ActiveMQ side; you'd have two config files,
one for activemq-0 with a network connector to activemq-1, and one for
activemq-1 with a network connector to activemq-0. But if the Docker
aspects of the solution aren't clear or that's not the path you want to go
down, keep asking questions on the Docker forum.

Tim

On Tue, Oct 30, 2018, 1:02 AM abhilash128 <[hidden email]>
wrote:

> Thanks for your input guys,
>
> I posted this question on docker discussion forum as well. I got below
> inputs :
>
> 1.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?
>
> 2.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.
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>