JMS Consume

JMS Consume

Certified

Consume messages from a JMS destination

Connects to a JMS queue or topic, receives messages until limits are hit, and writes them to internal storage. CLIENT_ACKNOWLEDGE is used for at-least-once delivery; set maxMessages or maxWaitTimeout to bound execution.

yaml
type: io.kestra.plugin.jms.Consume

Consume 100 Messages from a JMS Queue

yaml
id: jms_consume
namespace: company.team

tasks:
  - id: consume_from_queue
    type: io.kestra.plugin.jms.Consume
    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
    maxMessages: 100
    maxWaitTimeout: 5000
Properties

Destination to consume

Rendered queue or topic name; destinationType selects QUEUE vs TOPIC

Definitions
destinationName*Requiredstring

Destination name

Rendered JMS queue or topic name

destinationTypestring
DefaultQUEUE
Possible Values
QUEUETOPIC

Destination type

QUEUE or TOPIC

Connection factory configuration

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

Definitions
connectionFactoryClass*Requiredstring

ConnectionFactory class

Fully qualified class name of the JMS ConnectionFactory implementation.

connectionPropertiesobject

Connection properties

Additional POJO properties applied to the Direct or JNDI ConnectionFactory instance.

passwordstring

Password for broker authentication

Rendered password used when creating the connection. Omit for JNDI if the ConnectionFactory already embeds credentials.

providerJarPathsarray
SubTypestring

Provider JAR paths

One or more paths to the JMS provider JARs (e.g., file:///app/plugins/jms-libs/client.jar). If unset, all JARs under the plugins/jms-libs folder are added to the classpath.

useFilteredClassLoaderbooleanstring
Defaultfalse

Use filtered classloader

Enable only for providers that ship JMS API classes (e.g., SonicMQ/Aurea) to avoid ClassCastException by loading JMS APIs from the parent classloader. Leave disabled for typical providers like RabbitMQ, ActiveMQ, Artemis.

usernamestring

Username for broker authentication

Rendered username used when creating the connection. Omit for JNDI if the ConnectionFactory already embeds credentials.

jndiConnectionFactoryName*Requiredstring

JNDI ConnectionFactory name

jndiInitialContextFactory*Requiredstring

JNDI initial context factory

jndiProviderUrl*Requiredstring

JNDI provider URL

connectionPropertiesobject

Connection properties

Additional POJO properties applied to the Direct or JNDI ConnectionFactory instance.

jndiCredentialsstring

JNDI credentials

jndiPrincipalstring

JNDI principal

passwordstring

Password for broker authentication

Rendered password used when creating the connection. Omit for JNDI if the ConnectionFactory already embeds credentials.

providerJarPathsarray
SubTypestring

Provider JAR paths

One or more paths to the JMS provider JARs (e.g., file:///app/plugins/jms-libs/client.jar). If unset, all JARs under the plugins/jms-libs folder are added to the classpath.

useFilteredClassLoaderbooleanstring
Defaultfalse

Use filtered classloader

Enable only for providers that ship JMS API classes (e.g., SonicMQ/Aurea) to avoid ClassCastException by loading JMS APIs from the parent classloader. Leave disabled for typical providers like RabbitMQ, ActiveMQ, Artemis.

usernamestring

Username for broker authentication

Rendered username used when creating the connection. Omit for JNDI if the ConnectionFactory already embeds credentials.

Default1

Maximum messages to consume

Rendered upper bound on messages; default 1

Default0

Maximum wait time (ms)

Rendered timeout in milliseconds; default 0 waits indefinitely

Message selector

Optional JMS selector to filter messages server-side using SQL-92 syntax (e.g., "JMSPriority > 5 AND type = 'order'").

Reference (ref) of the pluginDefaults to apply to this task.

DefaultSTRING
Possible Values
STRINGJSONBYTES

Deserialization format

STRING for text, JSON for JSON-formatted text, BYTES for binary data.

Number of messages consumed

Formaturi

URI of the internal storage file containing the consumed messages