Integrating Using JMS

JMS Alternatives

Consider consuming JMS messages through an API Gateway such as Mulesoft. Configure your API Gateway to consume the JMS messages and forward those messages as HTTP REST requests to Appian's Web API. This provides several advantages over the JMS Integration:

  • The Web API Designer provides a better experience for both building and testing WebAPIs. Designers can test Web APIs directly in Appian. JMS requires writing a JMS client in Java for testing the JMS Integration
  • Appian's WebAPI integration will handle a larger volume of requests in Appian than Appian's JMS Process Integration Queue. The out of the box JMS integration will either require a new process per message or it will require a process to exist in memory for each JMS message.
  • The WebAPI does not require knowledge of the Appian Process Model or the Appian Process Instance which consumes the JMS message. JMS Message headers must contain either the process model ID or the process instance ID for Appian to handle the message. The Web API implementation works as a standard REST Web Service.
  • WebAPIs are compatible with Appian Cloud.
  • Appian's Web API provides more security than the JMS integration. Web APIs leverage the Appian security model with either Appian or LDAP credentials. This allows for many users to authenticate through the Web API (as opposed to one generic and pre-set credential for the JMS queue).
  • The JMS to API Gateway to Appian Web API approach transfers the complexity of dealing with the queues to a specialized tool that is better suited for dealing with JMS.

Integrating Appian with JMS Out-of-the-box

Integrating with JMS out-of-the-box is not supported in Appian Cloud.

Consuming JMS Messages

Appian has the capability to receive and consume JMS messages out of the box. Appian relies on the JMS capabilities of the application server to expose a local JMS queue. A message driven bean (MDB) is preconfigured to listen to incoming messages to the local queue and process them by forwarding the messages contents to their destinations in the process execution engines.

To integrate with JMS out of the box, JMS messages must be sent to the local queue in the application server. Please refer to the Appian documentation Working with the Java Messaging Service.

Sending JMS messages

Appian does not have the capability to send JMS messages out of the box.

Integrating Appian with an existing JMS infrastructure

This section answers the questions related to how to integrate Appian with an existing JMS queue or topic.

Consuming JMS Messages

Consuming JMS messages is not supported in Appian Cloud.

There are 2 options for Appian to consume JMS messages posted on an existing queue or topic hosted in a remote JMS provider:

  • Using a JMS bridge to establish a connection between the existing remote queue/topic and the Appian local queue.
  • Using a MDB to listen and consume messages on the existing remote queue/topic.

Using a JMS Bridge

A JMS bridge is used to communicate between the existing queue/topic and the Appian out of the box local queue. The JMS bridge is configured to forward all messages from the existing remote queue/topic to the Appian queue. When the messages are received by the Appian queue, they are processed by the out of the box JMS integration provided by Appian.

JMS bridge is a standard feature on most JMS providers. Please refer to your JMS vendor documentation for information about how to setup and configured JMS bridges.

Using a MDB

A new MDB is used to connect to the existing remote queue/topic and to listen for new messages. The MDB is deployed within the application server running Appian. When a message is received on the remote queue/topic, the MDB is notified. It consumes the message and forwards its contents to the Appian execution engines.

To use a new MDB as described above, you must:

  • Develop the MDB based on the JAVA EE documentation.
  • Within the MDB onMessage method, use the Appian Java class InternalMessage to create a Appian representation of the JMS message and to route it to its destination in the execution engines. More details available in the Appian documentation Working with the Java Messaging Service.
  • Deploy the MDB into the EJB container of the application server. This step is specific to the application server. Please refer to the vendor documentation.
  • Configure the connection (also known as activation spec) between the application server and the remote queue/topic. This may require Java libraries that are specific to your JMS provider. Please refer to the vendor documentation.

Sending JMS Messages

There are 2 options for Appian to send JMS messages to an existing queue or topic hosted in a remote JMS provider:

  • Using a custom Appian smart service plugin that acts as a JMS client
  • Using a JMS bridge between local queue defined in the application server and the existing remote queue/topic

Using a custom smart service plugin

A custom smart service plugin acts as a JMS client: it is used to connect to the remote queue/topic and send the JMS message.

The plugin is responsible for :

  • Creating the JMS message using the standard JEE JMS Java API
  • Establishing the connection with the remote queue/topic
  • Sending the message

Please refer to the documentation of your JMS vendor as implementation of JMS clients may vary.

Using a JMS Bridge

A JMS bridge is used to send the message to the remote queue/topic. To use a JMS bridge for this purpose, you must:

  • Create a new local queue or topic in the application server
  • Configure Appian to make this queue/topic available to the Send Message node. When configured correctly, the new queue/topic is listed in the list of destinations of the Send Message node. Configuration steps available in the Appian documentation Adding JMS Topics.
  • Configure a JMS bridge within the application server to forward the message to the remote queue/topic

When a process sends a JMS message, the JMS message is sent to the local queue using the Send Message node. The JMS bridge picks up the message and forwards it to the remote queue.

Scaling Appian for large JMS usage

Scaling Appian for large amounts of JMS message is achieved by adding additional processing nodes to handle more volume.

When large amounts of JMS messages need to be consumed by Appian:

  • Add additional application servers to increase the capacity for receiving and consuming messages
  • Add additional execution engines to increase the capacity of handling the actions triggered by the messages

When large amounts of JMS messages need to be sent by Appian:

  • Add additional application servers to increase the throughput of messages sent

Supported JMS Providers

Appian supports sending and receiving JMS messages from and to any JMS providers that comply with the Java JMS specifications.The list below shows some JMS vendors that Appian integrated with in the past. This list is not exhaustive.

  • Apache ActiveMQ
  • JBoss Hornet
  • Websphere MQ
  • MuleSoft Mule ESB

Some JMS providers may require using their Java libraries to send and receive messages due to how they implemented the JMS specifications. Please refer to your provider documentation.