You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Lachezar Dobrev <l....@gmail.com> on 2017/04/27 13:21:58 UTC

ActiveMQ or Artemis in a Docker Swarm?

  Hello all.
  I'm just beginning with Docker Swarm and am wondering the following:
  I have an application (.war for Tomcat, based on Springframework)
that has an embedded Artemis to allow communication between Web Socket
handlers. The application is like a multi-user chat, and uses a Topic
to send messages between the Web Socket instances. When distributed
every instance of the application knows every other instance and they
create a network of brokers that allows messages from one Web Socket
on one node to successfully reach a different Web Socket on a
different node. There is no broker discovery (network limitation: no
broadcast/multicast).

  How can I achieve the same in a Docker Swarm? Ideally pulling a new
instance of the application/container would somehow enter the Broker
Network and start exchanging messages with them.

Re: ActiveMQ or Artemis in a Docker Swarm?

Posted by Hadrian Zbarcea <hz...@gmail.com>.
We use ActiveMQ 5, not Artemis, with Docker with large numbers of 
brokers. Not swarm but Rancher and Cattle, and we are in process of 
moving, again not to swarm but to Kubernetes.

It's running in Karaf (not Tomcat) using blueprints (not spring) and we 
have karaf ConfigAdmin bundles that make the rancher metadata available 
in Karaf. It's also secure (not only using TLS, but it enforces 
connection authentication) and it's multi-tenant, in the sense that you 
can use the same brokers for many apps, even if you use the same 
destination names. Magic, pretty cool.

I will be presenting this setup at ApacheCon in Miami next month.

Cheers,
Hadrian

On 04/27/2017 09:21 AM, Lachezar Dobrev wrote:
>   Hello all.
>   I'm just beginning with Docker Swarm and am wondering the following:
>   I have an application (.war for Tomcat, based on Springframework)
> that has an embedded Artemis to allow communication between Web Socket
> handlers. The application is like a multi-user chat, and uses a Topic
> to send messages between the Web Socket instances. When distributed
> every instance of the application knows every other instance and they
> create a network of brokers that allows messages from one Web Socket
> on one node to successfully reach a different Web Socket on a
> different node. There is no broker discovery (network limitation: no
> broadcast/multicast).
>
>   How can I achieve the same in a Docker Swarm? Ideally pulling a new
> instance of the application/container would somehow enter the Broker
> Network and start exchanging messages with them.
>

Re: ActiveMQ or Artemis in a Docker Swarm?

Posted by Victor <vi...@gmail.com>.
I haven't done it specifically for docker swarm, but you could take a look
and adapt my approach for Kubernetes:
https://github.com/vromero/charts/tree/gh-pages/activemq-artemis


2017-04-27 6:21 GMT-07:00 Lachezar Dobrev <l....@gmail.com>:

>   Hello all.
>   I'm just beginning with Docker Swarm and am wondering the following:
>   I have an application (.war for Tomcat, based on Springframework)
> that has an embedded Artemis to allow communication between Web Socket
> handlers. The application is like a multi-user chat, and uses a Topic
> to send messages between the Web Socket instances. When distributed
> every instance of the application knows every other instance and they
> create a network of brokers that allows messages from one Web Socket
> on one node to successfully reach a different Web Socket on a
> different node. There is no broker discovery (network limitation: no
> broadcast/multicast).
>
>   How can I achieve the same in a Docker Swarm? Ideally pulling a new
> instance of the application/container would somehow enter the Broker
> Network and start exchanging messages with them.
>