The following example describes how to connect Apache ActiveMQ 5.x to Rhapsody using the JMS communication point:


Apache Active MQ Configuration

Installing the software

  1. Download the appropriate version of Apache ActiveMQ and install it.
  2. To get started with Apache ActiveMQ, refer to Getting Started Guide.

Starting the Domain

Start the following components:

  • Server - in order to start the AdminServer, run the command ApacheMQ_HOME\bin\activemq start.
  • Administration Console - navigate to http://localhost:8161/admin and enter the user and password (admin and admin, respectively).

Configuring JMS Resources   

  1. Navigate to Queues.
  2. Enter rhapsodyQueue in the Queue Name field:

  3. Select the Create button.
  4. The details of the new queue is displayed:

Rhapsody Configuration

Rhapsody IDE Route Configuration

Login to the Rhapsody IDE and configure a route including a JMS communication point and a destination where you want the message to reside.

In this example, an input JMS communication point is used to read messages from the Apache ActiveMQ JMS Queue and send the messages to the Hold Queue in Rhapsody. For details on the JMS communication point and managing routes, refer to JMS (Java Message Service) and Configuring Routes, respectively.

JMS Communication Point Configuration

Configuration

For the purposes of this example, the configuration properties for the JMS communication point are set as follows:

Property Value
Implementation JNDI
InitialContextFactory org.apache.activemq.jndi.ActiveMQInitialContextFactory
ProviderURL tcp://localhost:61616

Queue Connection Factory

QueueConnectionFactory

Connection Username

admin

Connection Password

admin
Custom Parameters Name = queue.rhapsodyQueue, Value = rhapsodyQueue
Input Destination rhapsodyQueue

Input Destination Type

Queue
Receiving Mode Polling

Auxiliary Files 

In order to make the JMS communication point work, you include the Apache ActiveMQ JMS clients. These files are located in ApacheMQ_HOME\lib. The following JAR files are required:

Testing

Check-in Changes, Starting the Route and Communication Point

Once the components in Rhapsody are configured, you can check them in and start them. From the Management Console, check the route and the JMS communication point status:

Sending Messages to the Apache ActiveMQ JMS Queue

  1. From the Administration Console, navigate to Send a JMS Message
  2. Enter rhapsodyQueue in the Destination field.
  3. For the purposes of this example, select Queue (but eventually you might select Topic if you have configured one in your environment).
  4. Enter the necessary fields. 
  5. Select the Send button.

Management Console

The Management Console will display the message consumed by the communication point and sent to the Hold Queue. Navigate to Monitoring>Monitoring the Hold Queue and select the message processed by the JMS communication point to display in it Message View: