Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I use Artemis with Camel Java DSL using the camel-jms component?

Right now I'm using JMS 2.0 with Artemis 1.2.0 on a Java EE 7 application and I would like to do some integration tasks with Camel.

Right now checking the camel-jms documentation, there is no mention whatsoever on how to use the generic camel JMS component to produce and consume messages to any JMS 2.0 compliant broker.

The only example on the component documentation is configuring an ActiveMQ connection factory with its specialized ActiveMQ component using the Spring DSL. How can I configure a connection for Camel JMS to connect to my Artemis instance?

Take into account that even though Artemis is compatible with ActiveMQ 5.x, I'm going to use a Camel route to publish and subscribe to shared durable topics, so I need to be able to configure an Artemis connection and do a publisher and a shared durable subscriber with it (only supported in JMS 2.0, ActiveMQ only supports JMS 1.1).

Thanks!

like image 553
Raul G Avatar asked Jan 21 '16 16:01

Raul G


People also ask

What is ActiveMQ in Apache Camel?

The ActiveMQ component allows messages to be sent to a JMS Queue or Topic or messages to be consumed from a JMS Queue or Topic using Apache ActiveMQ.

How does Camel framework work?

Apache Camel is an open source integration framework designed to make integrating systems simple and easy. It allows end users to integrate various systems using the same API, providing support for multiple protocols and data types, while being extensible and allowing the introduction of custom protocols.

What is camel Java used for?

Apache Camel ™ is a versatile open-source integration framework based on known Enterprise Integration Patterns. Camel empowers you to define routing and mediation rules in a variety of domain-specific languages (DSL, such as Java, XML, Groovy, Kotlin, and YAML).

Is Apache Camel A message queue?

Apache Camel - Message Queues.


1 Answers

In the end I just created an Artemis connection factory and I'm using camel-sjms, for JMS 2.0 features at the moment I just go straight to JMS 2.0 producers as a camel components, and for consumers I use the latest Spring Messaging which uses JMS 2.0

I hope that in the future, the camel-sjms module is updated for JMS 2.0 and that way I just use vanilla Camel instead of having to work around through custom components.

like image 53
Raul G Avatar answered Oct 05 '22 14:10

Raul G