ActiveMQ or Artemis in a Docker Swarm?

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

ActiveMQ or Artemis in a Docker Swarm?

Lachezar Dobrev
  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.
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ or Artemis in a Docker Swarm?

vromero
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 <[hidden email]>:

>   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.
>
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ or Artemis in a Docker Swarm?

Hadrian Zbarcea
In reply to this post by Lachezar Dobrev
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.
>