daniel.schlup601649

Using ActiveMQ 5.15.3 as JMS with Boomi to create Queues dynamically

Discussion created by daniel.schlup601649 on Apr 17, 2018

Introduction: This discussion describes the steps that I’ve applied to setup a test scenario to install the latest stable version (5.15.3) of Apache ActiveMQ on the localhost and create some simple integration processes to create dynamic queues based on message content and consume them afterwards. The AtomSphere queue component has some limitations when it comes to functionality such as that dynamic queues thru destinations cannot be created from an integration process.

I thought this somewhat more comprehensive discussion might help others that want to try something similar by using ActiveMQ. This is by no means complete but hopefully helps to make things easier. Other Q&A posts and the Boomi help can give you further hints on the topic.

 

Environment setup: The local atom is running on a Windows Server 2012R2, and ActiveMQ will be installed on the same server. Please consider the Java prerequisites which for this release are Java 1.8.

 

Apache ActiveMQ Installation and Setup

 

In general, you can follow the installation guide found at http://activemq.apache.org/getting-started.html#GettingStarted-InstallationProcedureforWindows.

 

Step 1: Download the latest stable release of ActiveMQ from http://activemq.apache.org/download.html. The latest stable release at the time of this writing is 5.15.3. I’ve downloaded the Windows distribution.

 

Step 2: Unzip the downloaded package to a directory of your choice.

 

Step 3: Copy the following Java archives from your ActiveMQ directory to Boomi:

  • <ActiveMQ Install>\lib\activemq-broker-5.15.3.jar
  • <ActiveMQ Install>\lib\activemq-client-5.15.3.jar
  • <ActiveMQ Install>\lib\geronimo-j2ee-management_1.1_spec-1.0.1.jar
  • <ActiveMQ Install>\lib\hawtbuf-1.11.jar

 

The Boomi directory needs to be created as <Boomi Install>\userlib\jms:

Step 4: Restart your atom.

 

Step 5: You can start the ActiveMQ broker from the command line window with the following command: <ActiveMQ Install>\bin\activemq start

 

You should be able to call the ActiveMQ Web console in our case on the local host at http://127.0.0.1:8161/admin with default user/pw being admin/admin:

 

Step 6: ActiveMQ can be run as a Windows Service by executing the <ActiveMQ Install>\bin\win64\InstallService.bat

 

 

 

 

Boomi Process to Send Messages to a Queue Dynamically

 

In this test scenario I am getting different types of messages from a SAP backend system by a generic listener which is in this process mimicked by four different message shapes. What I want to achieve is that the messages are sent to different ActiveMQ queues based on header content values such as sender, receiver, and message definition that is in the same format for every message type.

 

The test integration process looks as following:

 

The process:

  • Uses four different messages that I want to send to four separate queues based on content
  • Uses a data process shape to get the values that will make up the queue name from the content and put them into dynamic document properties
  • Uses the set properties shape to construct the JMS destination document property from the dynamic document properties. Note: use the prefix dynamicQueues/ for the queue name

 

Create your initial JMS Connection as following:

 

 

Create your initial JMS Send Operation as following:

 

 

A successful test run puts the messages into the respective queues being named as <sender>/<receiver>/<message type>:

 

 

Boomi Process to Get Messages from a Queue

In this test scenario I am retrieving a certain messages from a ActiveMQ queue to be processed by a specific consumer process. In the process I am aware of the queue name constructed from message content such as sender, receiver, and message definition. There is a dynamic aspect in it such as that the sender is the system the message has been received from and differentiates by environment, i.e. development, test, production.

 

The simple test integration process looks as following:

 

Since I want to assign the sender system value dynamically, based on the environment, I can use a process property setting, e.g. as this:

 

 

The process property can then be assigned as environment extension in the atom management.

 

I’ve used a set properties shape to construct the queue name as dynamic process property from which the message needs to retrieved as following:

 

Here, the sender system value is retrieved from the process property. The queue prefix dynamicQueues/ was used again.

 

Create your initial JMS Get Operation as following:

 

 

Assign the dynamic process property with the queue name to the destination parameter of the connector shape:

 

 

Testing the process the message is received from the queue:

 

 

The source system can send any message now, assuming the header format is the same, and we would not be required to adjust the listener process but only create an additional specific consumer process.

Outcomes