(888) 685-3101 ext. 2

Prerequisite:

  • Anypoint Studio – Enterprise Edition.
  • Access to TIBCO EMS Server.
  • Establish connection to TIBCO EMS server with the help of JMS connector (this will need configuration parameters and required JAR files).

Mule integration flow

Mule integration flow

Mule Settings & Configurations:

1. Need to get the following required JMS jars from the Message broker (TIBCO EMS)

  • jms-2.0.jar
  • tibcrypt.jar
  • tibjms.jar
  • tibjmsadmin.jar

Will import those external jars in to respective project as per guidelines like following location:

Properties for mule-ems jars

And then click on Apply and Close button.

As per the above step, we can import all required shared libraries into the respective project. These are useful for establishing the connection to EMS.

2. After that, copying the above jars in anypoint studio tooling as shown in the below path.

jars anypoint studio

3. As per Mule 4 applications, include a mule-artifact.json file in META-INF/mule-artifact/. This describes your app, configuration settings, the required Mule version, and the class loader configuration for adding external jars in server.

mule artifact json 4

Messaging channel (TIBCO EMS) Configurations:

1. In this step, we are doing configuration and settings at the messaging server level, which will start the server, establish the proper connections, and create the messaging models.

configuration messaging server level

As shown in the screenshot above, the server is now started and has established connections with respect to the above configuration parameters. Messaging server always runs on TCP protocol in the single network layer.

Then we will use the proper EMS server URL and here is the tcp://host:port for an example as mentioned below.

tcp://localhost:7222, those are default values while used in installation.

Login name: admin

Password: admin

2. In this we are creating destinations like queue/Topic, and here I am going to create MuleSample Queue with default settings and permissions. This queue is a static queue.

MuleSample Queue

Example Use Case in AnypointStudio:

Sending Message to EMS Flow:

In this example, we are pushing sample message to EMS server from the Web browser with the help of Http connector and JMS connector in Mule 4.x version.

Sample message

JMS Publisher connector configuration:

Enter the values for configuration, destination types, destination name, and actual request payload components in the General tab. For this, selecting the destination type is Queue type, the destination name is MuleSample (which we have created in EMS server), and payload is the actual business request, which we get from the Web browser.

Destination MuleSample

After that, we need to establish a connection with the EMS server along with the configuration parameters that are provided by the Messaging channel. For this, please refer below steps:

1. Click on the Connector configuration tab:

Connector configuration

2. Give a proper naming convention for connection Name, for example:

Naming convention

3. Click on Connection tab and select Generic Connection

Generic connection

4.And configure the required JMS driver:

required jms driver

5. Provide proper JNDI configuration parameters like the following:

JNDI configuration parameters

6. Give proper Connection parameters in the Connection tab:

connection tab

And then click on the OK button

Now we have established a proper connection with the TIBCO EMS server. Once we send the sample message/request from the web browser that message will send to the TIBCO EMS server with the help of destination. Meanwhile, we will keep building/running the state of the respective Mule project.

Share This