quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.73k stars 2.67k forks source link

Dev services for JMS/ActiveMQ #23595

Closed josephearl closed 2 years ago

josephearl commented 2 years ago

Description

I would like to be able to develop and test applications using the JMS/ActiveMQ OpenWire protocol - this is supported by both ActiveMQ 5 and Artemis.

Implementation ideas

The OpenWire protocol is supported by Artemis on port 61616 https://activemq.apache.org/components/artemis/documentation/latest/openwire.html by default and we already have AMQP dev services which start up Artemis - so it could potentially be done by just supporting a way of exposing that port on Artemis with the AMQP dev services.

Or it could be its own activemq extension? In which case perhaps it could also support ActiveMQ 5 images (e.g. webcenter/activemq).

quarkus-bot[bot] commented 2 years ago

/cc @stuartwdouglas

geoand commented 2 years ago

cc @cescoffier

cescoffier commented 2 years ago

We should extract the AMQP dev service in some common modules. However, we are waiting on settling the images to use in the AMQP dev service (#22976). So, we would need to be sure that ALL the compatible images can support the 2 protocols the very same way.

josephearl commented 2 years ago

Would be great if this could also set the appropriate properties for camel-quarkus-activemq when the dev service is used

camel.component.activemq.brokerURL, camel.component.activemq.username, camel.component.activemq.password

On second thoughts probably creating a connection factory bean would be better and compatible with other ActiveMQ integrations.

cescoffier commented 2 years ago

While we could do that we need to be very careful not to have to add properties for all existing extensions. The dev service generates a build item, so the Camel extension should consume it and register the properties.

josephearl commented 2 years ago

That probably makes more sense @cescoffier

middagj commented 2 years ago

@zhfeng has added DevServices to the quarkus-artemis extension in https://github.com/quarkiverse/quarkus-artemis/pull/55. Would that solve this issue?

zhfeng commented 2 years ago

@josephearl so you want to use quarkus-artemis and camel-quarkus-activemq togather? I think you can use

camel.component.activemq.broker-url=%{quarkus.artemis.url}

when enable the Artemis DevServices.

josephearl commented 2 years ago

Thanks that should work