Open Source API Gateway

jmsConnection

Version

Connection to a JMS broker. Works with every broker that has a Jakarta Messaging (JMS 3) client, e.g. ActiveMQ Artemis, ActiveMQ Classic 6, IBM MQ or AMQP brokers through Qpid JMS. The client library of the broker has to be put into the lib folder of Membrane.

Define the connection inline or once under components and reference it with $ref from several places.

Example Configuration

components:
orderBroker:
jmsConnection:
connectionFactory: org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
username: membrane
password: secret
# Properties of the connection factory
brokerURL: tcp://mq.example.com:61616
callTimeout: 30000
reconnectAttempts: -1
retryInterval: 2000
---
api:
port: 2000
flow:
- jmsProducer:
$ref: '#/components/orderBroker'
queue: orders
components:
   orderBroker:
     jmsConnection:
       connectionFactory: org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
       username: membrane
       password: secret
       # Properties of the connection factory
       brokerURL: tcp://mq.example.com:61616
       callTimeout: 30000
       reconnectAttempts: -1
       retryInterval: 2000
 ---
 api:
   port: 2000
   flow:
     - jmsProducer:
         $ref: '#/components/orderBroker'
         queue: orders

Syntax

jmsConnection:
connectionFactory: <string> # required
password: <string>
username: <string>
jmsConnection:
  connectionFactory: <string> # required
  password: <string>
  username: <string>

Attributes

NameRequiredDefaultDescriptionExamples
connectionFactorytrue-Class of the broker's jakarta.jms.ConnectionFactory.org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory | org.apache.activemq.ActiveMQConnectionFactory | com.ibm.mq.jakarta.jms.MQConnectionFactory | org.apache.qpid.jms.JmsConnectionFactory
passwordfalse-Password for the connection to the broker.secret
usernamefalse-User name for the connection to the broker.membrane

Can be used in