JMS connection

Description

A JMS connection describes how to reach a JMS broker. It is shared by the JMS consumer and JMS producer transforms, so broker credentials live in one place.

Modes

DIRECT

Uses the Apache ActiveMQ Artemis client that ships with the JMS transforms. Supply a broker URL and nothing else needs installing:

tcp://localhost:61616

JNDI

Looks the connection factory up through JNDI. This is how any other JMS 3.0 provider is used: put its client jar in the JMS transform plugin’s lib folder, then name its initial context factory and connection factory here.

For Apache ActiveMQ "Classic":

Option Value

Initial context factory

org.apache.activemq.jndi.ActiveMQInitialContextFactory

Provider URL

tcp://localhost:61616

Connection factory name

ConnectionFactory

For RabbitMQ, use the initial context factory from its JMS client; for IBM MQ, the one from its com.ibm.mq.jakarta.client distribution.

Options

Option Description

Connection name

Name this metadata object is referenced by.

Mode

DIRECT or JNDI.

Broker URL

DIRECT mode only. Supports variables.

Initial context factory

JNDI mode only: the Context.INITIAL_CONTEXT_FACTORY class name. Supports variables.

Provider URL

JNDI mode only: the Context.PROVIDER_URL. Supports variables.

Connection factory name

JNDI mode only: the name the connection factory is bound to. Defaults to ConnectionFactory. Supports variables.

Username / Password

Credentials. Leave the username empty for an unauthenticated connection. The password is stored encrypted like any other Hop password.

Client id

Optional JMS client id. The JMS specification requires one for a durable topic subscription.

Put the broker URL and credentials in project or environment variables so the same pipeline runs against a development and a production broker without editing.