Skip to main content

JMS Queue Configuration

Overview

JMS (Java Message Service) is the standard interface between Java applications and message queues. Frank!Framework JMS connections are configured in resources.yml under the jms key.

resources.yml Configuration

jms:
- name: "qcf-artemis"
type: "org.apache.activemq.artemis.jms.client.ActiveMQXAConnectionFactory"
url: "tcp://${jms.hostname:-localhost}:61615"

The name field is the part after jms/ in the connection factory reference. For example, name: "qcf-artemis" is referenced as jms/qcf-artemis in configurations.

Using JMS in Configurations

JmsSender

<JmsSender name="enqueue"
destinationName="myQueue"
messageClass="TEXT"
queueConnectionFactoryName="jms/qcf-artemis"/>

JmsListener

<JmsListener name="dequeue"
destinationName="myQueue"
messageClass="TEXT"
queueConnectionFactoryName="jms/qcf-artemis" />
AttributeDescription
queueConnectionFactoryNameJNDI reference to the queue connection factory (e.g., jms/qcf-artemis). Must match a resource defined in resources.yml.
destinationNameName of the queue. Can be chosen freely when jms.createDestination=true. In production, set this to false to restrict to administrator-configured queues.
messageClassMessage type (e.g., TEXT).

Connection Factory Types

BrandNon-XAXA
ActiveMQ Classicorg.apache.activemq.ActiveMQConnectionFactoryorg.apache.activemq.ActiveMQXAConnectionFactory
ActiveMQ Artemisorg.apache.activemq.artemis.jms.client.ActiveMQConnectionFactoryorg.apache.activemq.artemis.jms.client.ActiveMQXAConnectionFactory

Use XA connection factories when transactions span multiple systems (e.g., reading a queue and writing a database in one transaction). Set transactionmanager.type.default=NARAYANA to enable XA transaction support.

Driver Libraries

Place vendor-specific JMS client libraries in /opt/frank/drivers:

BrandLibraryMaven Artifact
ActiveMQ Classicactivemq-allorg.apache.activemq:activemq-all
ActiveMQ Artemisartemis-jakarta-client-allorg.apache.activemq:artemis-jakarta-client-all

Properties

PropertyDescription
jms.createDestinationWhen true, queues are auto-created if they do not exist. Use only in development.
jms.hostnameCan be referenced in resources.yml URLs for flexibility (e.g., tcp://${jms.hostname}:61616).

XA Transactions

XA transactions require:

  1. An XA-capable connection factory class
  2. The Narayana transaction manager:
transactionmanager.type.default=NARAYANA

See Integration Patterns for full Narayana configuration details.