Skip to content
Advertisement

Configuring Boomi JMS connector to ActiveMQ Artemis

I’ve been using a JMS connector in Boomi to connect with ActiveMQ Artemis 2.14, but using the client library activemq-all-5.15.11.jar and factory org.apache.activemq.jndi.ActiveMQInitialContextFactory This works, except I’m having issues with the connections creating numerous org.apache.activemq.artemis.core.server.impl.MessageReferenceImpl objects in the heap, which aren’t associated with the actual messages, but rather the ActiveMQ.Advisory.TempQueue.

So I’m trying to setup a Boomi JMS connector using the ActiveMQ Artemis 2.14 client. I have the following libraries imported into the Atom:

  • activemq-core-5.4.1.jar
  • artemis-core-client-2.14.0.jar
  • artemis-jms-client-2.14.0.jar
  • artemis-jms-client-all-2.14.0.jar
  • fscontext-4.6-b01.jar
  • geronimo-j2ee-management_1.1_spec-1.0.1.jar

Then I created a Custom Library, set it to Connector JMS, and added the above libraries and deployed to the Atom. In the connector I specified ActiveMQ, and the ConectionFactory org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory

This gives me a java dump, complaining that “Unable to create initial context” and “Invalid broker URL” My URL is a little fancy, but it works for the other ActiveMQ JMS connector.

failover:(tcp://[host]:61616,tcp://[host]:61616)?startupMaxReconnectAttempts=2&maxReconnectAttempts=0&maxReconnectDelay=1000

So I tried a simple URL, just tcp://[host]:61616 This give me a strange error: “Unexpected error executing process: java.lang.NoClassDefFoundError: org/jboss/logging/Logger”

So does this mean I’m including a library that I don’t need, which needs the jboss logger, or do I actually need the jboss logger library?

Any guidance on this is appreciated.

Advertisement

Answer

There are lots of issues to discuss here. I’ll take each one in turn.

…I’m having issues with the connections creating numerous…objects in the heap, which aren’t associated with the actual messages, but rather the ActiveMQ.Advisory.TempQueue.

You should be able to resolve this by setting supportAdvisory=false on the acceptor in broker.xml which your clients are using. This is discussed in the OpenWire chapter in the ActiveMQ Artemis user manual.

I have the following libraries imported into the Atom…

The only library you should actually need is artemis-jms-client-all-2.14.0.jar. As the name suggests, it contains all of the ActiveMQ Artemis client code along with all of the dependencies (e.g. Netty, JMS API classes, JBoss Logging framework, etc.).

In the connector I specified ActiveMQ, and the ConectionFactory org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory

The class org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory is not a JMS ConnectionFactory implementation. It is an InitialContextFactory implementation for JNDI.

This gives me a java dump, complaining that “Unable to create initial context” and “Invalid broker URL” My URL is a little fancy, but it works for the other ActiveMQ JMS connector.

The URL you’re using is suitable for the OpenWire JMS client used for ActiveMQ 5.x (which you were using previously). However, it is invalid for the core JMS client used for ActiveMQ Artemis (which you are using now). You can use something like this instead:

(tcp://[host]:61616,tcp://[host]:61616)?ha=true&initialConnectAttempts=2&reconnectAttempts=0&maxRetryInterval=1000
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement