Supporting ActiveMQ Artemis out-of-the-box

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

Supporting ActiveMQ Artemis out-of-the-box

jgallimore
Hi folks

A while back, I created this project
https://github.com/jgallimore/artemis-setup, which helps with using
ActiveMQ Artemis as the JMS broker, as opposed to ActiveMQ 5.

I'll pull this into an example today so hopefully anyone interested will be
able to have a go with it.

In terms of ActiveMQ, does anyone have any thoughts on whether we should
look at using Artemis out of the box as opposed to the current ActiveMQ? In
my head I'm wondering if we can make it easily pluggable so you can choose
which one you want, using as similar config as possible (so still enabling
an embedded mode if possible - I suspect that might be a challenge). I
think ActiveMQ 5 is still used (is Amazon MQ based on it?) so I don't know
that I'd want to drop support for it at this point.

I'd be interested in hearing other thoughts.

Jon
Reply | Threaded
Open this post in threaded view
|

Re: Supporting ActiveMQ Artemis out-of-the-box

César Hernández Mendoza
Hi Jonathan,
It seems Amazon is based on Apache ActiveMQ versions 5.15.0, 5.15.6, and
5.15.8.
https://aws.amazon.com/amazon-mq/faqs/

El mié., 9 ene. 2019 a las 4:04, Jonathan Gallimore (<
[hidden email]>) escribió:

> Hi folks
>
> A while back, I created this project
> https://github.com/jgallimore/artemis-setup, which helps with using
> ActiveMQ Artemis as the JMS broker, as opposed to ActiveMQ 5.
>
> I'll pull this into an example today so hopefully anyone interested will be
> able to have a go with it.
>
> In terms of ActiveMQ, does anyone have any thoughts on whether we should
> look at using Artemis out of the box as opposed to the current ActiveMQ? In
> my head I'm wondering if we can make it easily pluggable so you can choose
> which one you want, using as similar config as possible (so still enabling
> an embedded mode if possible - I suspect that might be a challenge). I
> think ActiveMQ 5 is still used (is Amazon MQ based on it?) so I don't know
> that I'd want to drop support for it at this point.
>
> I'd be interested in hearing other thoughts.
>
> Jon
>


--
Atentamente:
César Hernández Mendoza.
Reply | Threaded
Open this post in threaded view
|

Re: Supporting ActiveMQ Artemis out-of-the-box

exabrial12
So a couple of notes from the field:

* You can connect TomEE to an Artemis broker right now. Artemis can speak
the OpenWire protocol and the ActiveMQ Client in TomEE does too. :)
* Artemis has a dispatch and scalability advantage over ActiveMQ5. But, only
if you are using an external broker. ActiveMQ5 with the vm://localhost
transport is stupendously fast.
* Even if you're using ActiveMQ5 as an external broker, you're not going to
notice a performance benefit from using Artemis externally until you have a
very large number of topics, queues, or messages (multiple thousands of
each)

From a software engineering standpoint:

* JMS2.0 support in TomEE is done with a shim over the legacy JMS Api. It
would be significant decrease in LOC to maintain if we could have native
support from the Artemis Client.
* I don't know if the Artemis client can connect to an external ActiveMQ5
broker though. That would be sweet if it could
* I like the idea of supporting both brokers externally



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Reply | Threaded
Open this post in threaded view
|

Re: Supporting ActiveMQ Artemis out-of-the-box

jgallimore
Thanks for that. That's a good point about the OpenWire protocol. The
project I referenced in my previous message uses the Artemis client in
TomEE adding the necessary jars. If using the ActiveMQ 5 client works with
Artemis, then those changes might not be needed. I'll add the example in
any case.

From my point of view, being able to connect to both brokers makes sense.

Jon

On Wed, 9 Jan 2019, 16:08 exabrial12 <[hidden email] wrote:

> So a couple of notes from the field:
>
> * You can connect TomEE to an Artemis broker right now. Artemis can speak
> the OpenWire protocol and the ActiveMQ Client in TomEE does too. :)
> * Artemis has a dispatch and scalability advantage over ActiveMQ5. But,
> only
> if you are using an external broker. ActiveMQ5 with the vm://localhost
> transport is stupendously fast.
> * Even if you're using ActiveMQ5 as an external broker, you're not going to
> notice a performance benefit from using Artemis externally until you have a
> very large number of topics, queues, or messages (multiple thousands of
> each)
>
> From a software engineering standpoint:
>
> * JMS2.0 support in TomEE is done with a shim over the legacy JMS Api. It
> would be significant decrease in LOC to maintain if we could have native
> support from the Artemis Client.
> * I don't know if the Artemis client can connect to an external ActiveMQ5
> broker though. That would be sweet if it could
> * I like the idea of supporting both brokers externally
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>
Reply | Threaded
Open this post in threaded view
|

Re: Supporting ActiveMQ Artemis out-of-the-box

jgallimore
I made an attempt clone the simple-mdb example and hook it up to an
external Artemis broker here:
https://github.com/jgallimore/tomee/blob/artemis-example/examples/jms-artemis

With an external broker running on localhost:61616 it all works, the
message is sent on the ChatBean queue, the MDB receives it, and replies to
the AnswerQueue. However the message consumer in the test flat out won't
consume from the AnswerQueue here:
https://github.com/jgallimore/tomee/blob/artemis-example/examples/jms-artemis/src/test/java/org/superbiz/mdb/ChatBeanTest.java#L85.
I can see the messages in the queue in the console, but I can't get
anything to read them. I'll probably have to park this and come back to it,
but if anyone sees my mistake, please do let me know :-)

Cheers

Jon

On Wed, Jan 9, 2019 at 4:21 PM Jonathan Gallimore <
[hidden email]> wrote:

> Thanks for that. That's a good point about the OpenWire protocol. The
> project I referenced in my previous message uses the Artemis client in
> TomEE adding the necessary jars. If using the ActiveMQ 5 client works with
> Artemis, then those changes might not be needed. I'll add the example in
> any case.
>
> From my point of view, being able to connect to both brokers makes sense.
>
> Jon
>
> On Wed, 9 Jan 2019, 16:08 exabrial12 <[hidden email] wrote:
>
>> So a couple of notes from the field:
>>
>> * You can connect TomEE to an Artemis broker right now. Artemis can speak
>> the OpenWire protocol and the ActiveMQ Client in TomEE does too. :)
>> * Artemis has a dispatch and scalability advantage over ActiveMQ5. But,
>> only
>> if you are using an external broker. ActiveMQ5 with the vm://localhost
>> transport is stupendously fast.
>> * Even if you're using ActiveMQ5 as an external broker, you're not going
>> to
>> notice a performance benefit from using Artemis externally until you have
>> a
>> very large number of topics, queues, or messages (multiple thousands of
>> each)
>>
>> From a software engineering standpoint:
>>
>> * JMS2.0 support in TomEE is done with a shim over the legacy JMS Api. It
>> would be significant decrease in LOC to maintain if we could have native
>> support from the Artemis Client.
>> * I don't know if the Artemis client can connect to an external ActiveMQ5
>> broker though. That would be sweet if it could
>> * I like the idea of supporting both brokers externally
>>
>>
>>
>> --
>> Sent from:
>> http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Supporting ActiveMQ Artemis out-of-the-box

jgallimore
Running this `./artemis consumer --destination queue://AnswerQueue
--message-count 1 --verbose` does work:

Consumer:: filter = null
Consumer ActiveMQQueue[AnswerQueue], thread=0 wait until 1 messages are
consumed
Consumer ActiveMQQueue[AnswerQueue], thread=0 Received Hello, Test Case!
Received text sized at 17
Consumer ActiveMQQueue[AnswerQueue], thread=0 Consumed: 1 messages
Consumer ActiveMQQueue[AnswerQueue], thread=0 Consumer thread finished

Which would suggest something isn't right with the consumer code in the
test.

Jon

On Thu, Jan 10, 2019 at 3:45 PM Jonathan Gallimore <
[hidden email]> wrote:

> I made an attempt clone the simple-mdb example and hook it up to an
> external Artemis broker here:
> https://github.com/jgallimore/tomee/blob/artemis-example/examples/jms-artemis
>
> With an external broker running on localhost:61616 it all works, the
> message is sent on the ChatBean queue, the MDB receives it, and replies to
> the AnswerQueue. However the message consumer in the test flat out won't
> consume from the AnswerQueue here:
> https://github.com/jgallimore/tomee/blob/artemis-example/examples/jms-artemis/src/test/java/org/superbiz/mdb/ChatBeanTest.java#L85.
> I can see the messages in the queue in the console, but I can't get
> anything to read them. I'll probably have to park this and come back to it,
> but if anyone sees my mistake, please do let me know :-)
>
> Cheers
>
> Jon
>
> On Wed, Jan 9, 2019 at 4:21 PM Jonathan Gallimore <
> [hidden email]> wrote:
>
>> Thanks for that. That's a good point about the OpenWire protocol. The
>> project I referenced in my previous message uses the Artemis client in
>> TomEE adding the necessary jars. If using the ActiveMQ 5 client works with
>> Artemis, then those changes might not be needed. I'll add the example in
>> any case.
>>
>> From my point of view, being able to connect to both brokers makes sense.
>>
>> Jon
>>
>> On Wed, 9 Jan 2019, 16:08 exabrial12 <[hidden email] wrote:
>>
>>> So a couple of notes from the field:
>>>
>>> * You can connect TomEE to an Artemis broker right now. Artemis can speak
>>> the OpenWire protocol and the ActiveMQ Client in TomEE does too. :)
>>> * Artemis has a dispatch and scalability advantage over ActiveMQ5. But,
>>> only
>>> if you are using an external broker. ActiveMQ5 with the vm://localhost
>>> transport is stupendously fast.
>>> * Even if you're using ActiveMQ5 as an external broker, you're not going
>>> to
>>> notice a performance benefit from using Artemis externally until you
>>> have a
>>> very large number of topics, queues, or messages (multiple thousands of
>>> each)
>>>
>>> From a software engineering standpoint:
>>>
>>> * JMS2.0 support in TomEE is done with a shim over the legacy JMS Api. It
>>> would be significant decrease in LOC to maintain if we could have native
>>> support from the Artemis Client.
>>> * I don't know if the Artemis client can connect to an external ActiveMQ5
>>> broker though. That would be sweet if it could
>>> * I like the idea of supporting both brokers externally
>>>
>>>
>>>
>>> --
>>> Sent from:
>>> http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>>>
>>