JMSProducer​J​M​S​Producer

Produce messages to a JMS queue or topic.

yaml
type: "io.kestra.plugin.jms.JMSProducer"

Produce a List of Messages to a JMS Queue

yaml
id: jms_produce
namespace: company.team

tasks:
  - id: produce_to_queue
    type: io.kestra.plugin.jms.JMSProducer
    connectionFactoryConfig:
      type: DIRECT
      providerJarPaths: kestra:///jms/activemq-client.jar
      connectionFactoryClass: org.apache.activemq.ActiveMQConnectionFactory
      username: admin
      password: "{{ secret('AMQ_PASSWORD') }}"
    destination:
      name: my-queue
      destinationType: QUEUE
    from:
      - data: "Hello World"
        headers:
          property1: "value1"
      - data:
          message: "Another message"
          id: 123
Properties

The destination to send messages to.

Structured data items, either as a map, a list of map, a URI, or a JSON string.

Structured data items can be defined in the following ways:

  • A single item as a map (a document).
  • A list of items as a list of maps (a list of documents).
  • A URI, supported schemes are kestra for internal storage files, file for host local files, and nsfile for namespace files.
  • A JSON String that will then be serialized either as a single item or a list of items.

Connection factory configuration.

Configuration for connecting to the JMS broker. Supports both direct connection factory instantiation and JNDI lookup.

Default 2

The JMS delivery mode used to send the message (default: 2 = PERSISTENT)

Default 4

The JMS priority used to send the message (default: 4)

Default STRING
Possible Values
STRINGJSONBYTES

The serialization format for the message body.

Determines how message bodies are serialized. STRING for text messages, JSON for JSON-formatted text, BYTES for binary data.

Default 0

The time to live of the sent message in milliseconds (default: 0 = does not expire)

Number of messages published.

JNDI Connection Factory Name

JNDI Initial Context Factory

JNDI Provider URL

Connection Properties

Additional (Pojo) properties to set on the Direct/JNDI ConnectionFactory instance.

JNDI Credentials

JNDI Principal

The password for broker authentication.

This is used when creating the connection to the JMS broker. Omit for JNDI if credentials are embedded in the ConnectionFactory.

SubType string

Provider JAR Path(s)

The path to the JMS provider's JAR file(s). This can be a single path or a list of paths (JARs). (e.g., 'file:///app/plugins/jms-libs/client.jar').If not specified, all jar files in the 'jms-libs' sub folder of your plugins location will be added to the classpath.

Default false

Use Filtered ClassLoader

Enable this for JMS providers that bundle JMS API classes in their JAR (e.g., SonicMQ/Aurea Messenger). When enabled, JMS API classes are loaded from the parent classloader to prevent ClassCastException. Leave disabled (default: false) for well-behaved providers like RabbitMQ, ActiveMQ, Artemis, etc. Only enable this if you encounter ClassCastException with javax.jms or jakarta.jms classes.

The username for broker authentication.

This is used when creating the connection to the JMS broker. Omit for JNDI if credentials are embedded in the ConnectionFactory.

Connection Factory Class

The fully qualified class name of the JMS ConnectionFactory.

Connection Properties

Additional (Pojo) properties to set on the Direct/JNDI ConnectionFactory instance.

The password for broker authentication.

This is used when creating the connection to the JMS broker. Omit for JNDI if credentials are embedded in the ConnectionFactory.

SubType string

Provider JAR Path(s)

The path to the JMS provider's JAR file(s). This can be a single path or a list of paths (JARs). (e.g., 'file:///app/plugins/jms-libs/client.jar').If not specified, all jar files in the 'jms-libs' sub folder of your plugins location will be added to the classpath.

Default false

Use Filtered ClassLoader

Enable this for JMS providers that bundle JMS API classes in their JAR (e.g., SonicMQ/Aurea Messenger). When enabled, JMS API classes are loaded from the parent classloader to prevent ClassCastException. Leave disabled (default: false) for well-behaved providers like RabbitMQ, ActiveMQ, Artemis, etc. Only enable this if you encounter ClassCastException with javax.jms or jakarta.jms classes.

The username for broker authentication.

This is used when creating the connection to the JMS broker. Omit for JNDI if credentials are embedded in the ConnectionFactory.

The name of the JMS queue or topic.

Default QUEUE
Possible Values
QUEUETOPIC

The type of the destination.