jms egress connector

JMS Egress Connector

Version: 17.07

Supported Since: 17.01

What is Spring JMS Egress Connector?

Spring JMS Egress Connector can be used to send messages to JMS destinations from UltraESB. At the moment, UltraESB supports JMS specification 1.0.2+ and if you are using any proprietary JMS server it MUST be compatible with the 1.0.2+ specification.

In order to use the JMS Egress Connector, you must first select the Spring JMS Connector dependency from the connector list when you are creating an empty Ultra project. If you have already created a project, you can add the Spring JMS Connector dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Connectors list, select the Spring JMS Connector dependency.
jms egress connector 13

Out Ports

On Exception

The message will be sent to this out port if the Egress Connector failed to process the message due to some reason

Response Processor

The message will be sent to this out port if the Complete Flow property is disabled and the message has been sent to the JMS destination successfully

Side Ports

Connector Operation

This port is used to connect operational elements to the Egress Connector. By-default, user does not have to connect any operational element and the default connector operation will be used.

Parameters

* marked fields are mandatory

JMS Template *

Basic

The org.springframework.jms.core.JmsTemplate instance to be used in-order to send messages to destination queue.

JMS Destination *

Basic

Name of the destination queue

Meta-Info Populator

Advanced

An instance of org.adroitlogic.x.transport.jms.util.MetaInfoPopulator to allow custom meta information to be populated into the message

Complete Flow

Advanced

If true, the integration flow will be completed once the message has been sent to the JMS destination. If false, the original message sent to the JMS destination will be emitted to the Response Processor out port to continue the flow

Weight

Fail-Over

Weight for the Egress Connector if Egress Load Balancer element is used with Weighted/Weighted with Failover algorithm is used.

Sample Use Case

Prerequisite

You need to specify a JMS Template to send messages to the destination. For this example let’s use ActiveMQ and if you have not already installed ActiveMQ please follow the installation guide.

First open the project.xpml file of the project and right click on it (on the XML content of the file). From the context menu, select Resource Template as shown in below figure

jms egress connector 5

After that from the shown dialog box, select ActiveMQ JMS template.

jms egress connector 6

Next you need to specify the required parameters as shown below. It is mandatory to specify a bean prefix and for that you can specify any value. The only other mandatory field is the ActiveMQ Broker URL.

jms egress connector 7
1. Sending a message to a JMS queue

In-order to send a message to a destination queue, first we need to inject a message to the UltraESB and for that let’s first add a JMS Ingress Connector to obtain a message into the UltraESB. If you are not familiar with JMS Ingress Connector, refer JMS Ingress Connector.

Next add a JMS Egress Connector and specify the Active MQ JMS Template and the destination queue name as shown below

jms egress connector 1

After that connect JMS Ingress/Egress connectors as shown below.