Adapter For ActiveMq

Hello,
Recently we are planning to implement the axon framework for our legacy application. However we have activemq infrastructure in place. Im curious if we have any adapter to support the events to pass it to activemq instead the rabbitmq. Also how do we override on the listener side not to use the rabbitmq.

Hi Sai,

ActiveMQ also implements the AMQP interface (depending on the version you use, obviously). In that case, you can use the axon-amqp module to connect to it (using the Rabbit client). Alternatively, you can implement an adapter in the same style as the AMQP one, both for the reading, as well as the sending side.

Hope this helps.
Cheers,

Allard

Thank you. Do we have any sample project ?

Hi,

The demo application I used in my webinar with Pivotal contains an AMQP connection:
https://github.com/abuijze/bootiful-axon

There is a link to the webinar in the readme file.

Allard

I saw this video but it has the normal rabbit client connection. But I would really appreciate if we have something for this “ActiveMQ also implements the AMQP interface (depending on the version you use, obviously). In that case, you can use the axon-amqp module to connect to it (using the Rabbit client). Alternatively, you can implement an adapter in the same style as the AMQP one, both for the reading, as well as the sending side.”

Hi,

the only thing you need to do, is point the Axon application to an ActiveMQ server. If you ActiveMQ supports AMQP, then the Axon-AMQP module is able to connect to it. The fact that it uses a Rabbit client doesn’t matter.

Allard

Hi Allard,

When you say point Axon Application to an ActiveMQ server, you mean just leave all @RabbitListener and other configs as it is and point the properties file to ActiveMQ instead of Rabbit?

If that is the case then which version is compatible because I’ve ActiveMQ 5.15.5 and it says Caused by: com.rabbitmq.client.MalformedFrameException: AMQP protocol version mismatch; we are version 0-9-1, server sent signature 0,1,0,0 while connecting to ActiveMQ.

Thanks,
Malay

Hi,

I believe the reason for this could be that Spring Starter AMQP does not support AMQP 1.0 while ActiveMQ does not support AMQP 0.9.1 which is in turn used by RabbitMQ and SpringAMQP and also by axon-amqp(which seems to have a rabbit client), so we can not connect ot ActiveMQ and still use axon-amqp, can anyone provide an work around to using this the way Allard mentioned ?

Thanks,
Malay

Hi,

I have heard someone mention a plugin of some sort for ActiveMQ to have it support the 0.9 version of the protocol. Haven’t checked/researched myself, but it could be worth a quick search.

Cheers,

Allard

Hi Allard,

I searched for such plugin but could not find it, actually it was other way around :sweat_smile: rabbitMQ is having a plugin to support 1.0 version of AMQP. For now I guess connecting ActiveMQ using JMS in traditional way can be one of the ways to get this rolling. Are there any plans of having AMQP-1.0 support as a separate implementation instead of leveraging Rabbit’s client in Axon’s roadmap ?

Hi Malay,

hmm… that’s inconvenient. We did have some discussions around adopting JMS to support AMQP 1.0, but haven’t put it on our roadmap yet. Feel free to contribute that :wink:

Cheers,

Allard

Hi Allard,

Already working on that :smiley:

Hi everyone. I am still facing the same issue. ActiveMQ supports AMQP 1.0, but spring amqp package has 0.9 version.
I’m trying to use JMS, but not getting an optimal solution.
See https://stackoverflow.com/questions/55794358/trigger-axons-eventhandler-from-jmslistener/56035178#56035178