Nav

JMS Connector Documentation Reference

JmsConnector is a JMS 1.0.2b, 1.1 and 2.0 compliant MuleSoft Extension, used to consume and produce JMS Messages. The Extension supports all JMS functionality including topics and queues, durable subscribers, acknowledgement modes and local transactions.

Configurations


Config

Base configuration for JmsConnector

Parameters

Name Type Description Default Value Required

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x 

Encoding

String

The default encoding of the Message body to be used if the message doesn't communicate it

 

Content Type

String

The default contentType of the Message body to be used if the message doesn't communicate it

*/*

 

Ack Mode

Enumeration, one of:

  • IMMEDIATE

  • AUTO

  • MANUAL

  • DUPS_OK

The ConsumerAckMode to use when consuming a Message Can be overridden at the message source level. This attribute has to be IMMEDIATE if transactionType is LOCAL or MULTI

AUTO

 

Consumer Type

The ConsumerType to be used by default when consuming a Message Can be overridden at the message source level.

 

Selector

String

Default selector to be used for filtering when consuming a Message Can be overridden at the message source level.

 

Max Redelivery

Number

Used to configure the number of redelivers before discarding the message. No redelivery is represented with 0, while -1 means infinite re deliveries accepted.

0

 

Persistent Delivery

Boolean

Sets the default value for the Message#getJMSDeliveryMode. If true, the DeliveryMode#PERSISTENT mode will be used, which instructs the JMS provider to take extra care to insure the message is not lost in transit due to a JMS provider failure.

false

 

Priority

Number

Defines the default Message#getJMSPriority to use when sending messages

4

 

Time To Live

Number

Defines the default time the message will be in the broker before it expires and is discarded

0

 

Time To Live Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #timeToLive attribute.

Defaults to MILLISECONDS

MILLISECONDS

 

Disable Message Id

Boolean

Defines the default value to use when producing messages, for disabling the Message#getJMSMessageID generation in the broker. Depending on the provider it may or may not have effect

false

 

Disable Message Timestamp

Boolean

Defines the default value to use, when producing messages, for disable Message#getJMSTimestamp generation in the broker. Depending on the provider it may or may not have effect.

false

 

Delivery Delay

Number

This is used to determine the Message delivery delay time which is calculated by adding the deliveryDelay value specified on the send method to the time the message was sent.

Only used in JmsSpecification#JMS_2_0

 

Delivery Delay Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #deliveryDelay attribute.

Defaults to MILLISECONDS

MILLISECONDS

 

Jms Type

String

A message JMSType identifier supplied by a client when a message is sent.

 

Associated Operations

Associated Sources

Operations

Consume

<jms:consume>

Operation that allows the user to consume a single Message from a given Destination.

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x 

Destination

String

the name of the Destination from where the Message should be consumed

x 

Consumer Type

the type of the MessageConsumer that is required for the given destination, along with any extra configurations that are required based on the destination type.

 

Ack Mode

Enumeration, one of:

  • IMMEDIATE

  • MANUAL

the ConsumerAckMode that will be configured over the Message and Session

 

Selector

String

a custom JMS selector for filtering the messages

 

Content Type

String

the Message's content content type

 

Encoding

String

the Message's content encoding

 

Maximum Wait

Number

maximum time to wait for a message before timing out

10000

 

Maximum Wait Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to be used in the maximumWaitTime configurations

MILLISECONDS

 

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

 

Target Variable

String

The name of a variable on which the operation's output will be placed

 

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

 

Reconnection Strategy

A retry strategy in case of connectivity errors

 

Output

Type

Any

Attributes Type

For Configurations.

Throws

  • JMS:TIMEOUT  

  • JMS:CONNECTIVITY  

  • JMS:CONSUMING  

  • JMS:SECURITY  

  • JMS:RETRY_EXHAUSTED  

  • JMS:DESTINATION_NOT_FOUND  

  • JMS:ACK  

Publish

<jms:publish>

Operation that allows the user to send a Message to a JMS Destination

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x 

Destination

String

the name of the Destination where the Message should be sent

x 

Destination Type

Enumeration, one of:

  • QUEUE

  • TOPIC

the DestinationType of the destination

QUEUE

 

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

 

Body

Any

The body of the Message

#[payload]

 

Jms Type

String

The JMSType header of the Message

 

Correlation Id

String

The JMSCorrelationID header of the Message

 

Send Content Type

Boolean

true if the body type should be sent as a Message property

true

 

ContentType

String

The content type of the body

 

Send Encoding

Boolean

true if the body outboundEncoding should be sent as a Message property

true

 

Encoding

String

The outboundEncoding of the message's body

 

Reply To

The JMSReplyTo header information of the Destination where this Message should be replied to

 

User Properties

Object

The custom user properties that should be set for this Message. Each property is merged with other default JMS user properties. All the JMS user properties are set at once in a single Object. You can write this object as a DataWeave object, such as `#[output application/json --- { userName: vars.user, appName: 'myApp'}]`. Each key/value from the user properties object is then set as a separate JMS user property.

 

JMSX Properties

The JMSX properties that should be set to this Message

 

Persistent Delivery

Boolean

If true; the Message will be sent using the PERSISTENT JMSDeliveryMode

 

Priority

Number

The default JMSPriority value to be used when sending the message

 

Time To Live

Number

Defines the default time the message will be in the broker before it expires and is discarded

 

Time To Live Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to be used in the timeToLive configurations

 

Disable Message Id

Boolean

If true; the Message will be flagged to avoid generating its MessageID

 

Disable Message Timestamp

Boolean

If true; the Message will be flagged to avoid generating its sent Timestamp

 

Delivery Delay

Number

Only used by JMS 2.0. Sets the delivery delay to be applied in order to postpone the Message delivery

 

Delivery Delay Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to be used in the deliveryDelay configurations

 

Reconnection Strategy

A retry strategy in case of connectivity errors

 

For Configurations.

Throws

  • JMS:PUBLISHING  

  • JMS:CONNECTIVITY  

  • JMS:SECURITY  

  • JMS:ILLEGAL_BODY  

  • JMS:RETRY_EXHAUSTED  

  • JMS:DESTINATION_NOT_FOUND  

Publish Consume

<jms:publish-consume>

Operation that allows the user to send a message to a JMS Destination and waits for a response either to the provided ReplyTo destination or to a temporary Destination created dynamically

Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x 

Destination

String

the name of the Destination where the Message should be sent

x 

Body

Any

The body of the Message

#[payload]

 

Jms Type

String

The JMSType header of the Message

 

Correlation Id

String

The JMSCorrelationID header of the Message

 

Send Content Type

Boolean

true if the body type should be sent as a Message property

true

 

ContentType

String

The content type of the body

 

Send Encoding

Boolean

true if the body outboundEncoding should be sent as a Message property

true

 

Encoding

String

The outboundEncoding of the message's body

 

Reply To

The JMSReplyTo header information of the Destination where this Message should be replied to

 

User Properties

Object

The custom user properties that should be set for this Message. Each property is merged with other default JMS user properties. All the JMS user properties are set at once in a single Object. You can write this object as a DataWeave object, such as `#[output application/json --- { userName: vars.user, appName: 'myApp'}]`. Each key/value from the user properties object is then set as a separate JMS user property.

 

JMSX Properties

The JMSX properties that should be set to this Message

 

Persistent Delivery

Boolean

If true; the Message will be sent using the PERSISTENT JMSDeliveryMode

 

Priority

Number

The default JMSPriority value to be used when sending the message

 

Time To Live

Number

Defines the default time the message will be in the broker before it expires and is discarded

 

Time To Live Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to be used in the timeToLive configurations

 

Disable Message Id

Boolean

If true; the Message will be flagged to avoid generating its MessageID

 

Disable Message Timestamp

Boolean

If true; the Message will be flagged to avoid generating its sent Timestamp

 

Delivery Delay

Number

Only used by JMS 2.0. Sets the delivery delay to be applied in order to postpone the Message delivery

 

Delivery Delay Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to be used in the deliveryDelay configurations

 

Ack Mode

Enumeration, one of:

  • IMMEDIATE

  • MANUAL

The Session ACK mode to use when consuming the message

 

Maximum Wait

Number

Maximum time to wait for a message to arrive before timeout

10000

 

Maximum Wait Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit to be used in the maximumWaitTime configuration

MILLISECONDS

 

Content Type

String

The content type of the message body to be consumed

 

Encoding

String

The encoding of the message body to be consumed

 

Target Variable

String

The name of a variable on which the operation's output will be placed

 

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

 

Reconnection Strategy

A retry strategy in case of connectivity errors

 

Output

Type

Any

Attributes Type

For Configurations.

Throws

  • JMS:PUBLISHING  

  • JMS:TIMEOUT  

  • JMS:CONNECTIVITY  

  • JMS:CONSUMING  

  • JMS:SECURITY  

  • JMS:ILLEGAL_BODY  

  • JMS:RETRY_EXHAUSTED  

  • JMS:DESTINATION_NOT_FOUND  

  • JMS:ACK  

Ack

<jms:ack>

Allows the user to perform an ACK when the AckMode#MANUAL mode is elected while consuming the Message. As per JMS Spec, performing an ACK over a single Message automatically works as an ACK for all the Messages produced in the same JmsSession.

Parameters

Name Type Description Default Value Required

Ack Id

String

The AckId of the Message to ACK

x 

Throws

  • JMS:ACK  

Recover Session

<jms:recover-session>

Allows the user to perform a session recover when the AckMode#MANUAL mode is elected while consuming the Message. As per JMS Spec, performing a session recover automatically will redeliver all the consumed messages that had not being acknowledged before this recover.

Parameters

Name Type Description Default Value Required

Ack Id

String

The AckId of the Message Session to recover

x 

Throws

  • JMS:SESSION_RECOVER  

Sources

Listener

<jms:listener>

JMS Subscriber for Destinations, allows to listen for incoming Messages on JMS queues or JMS topics.

Listener Configuration Parameters

Name Type Description Default Value Required

Configuration

String

The name of the configuration to use.

x 

Destination

String

The name of the Destination used to consume Messages

x 

Consumer type

The Type of the Consumer that should be used for the provided destination. You must set one of these choices for the Listener to be activated.

 

Ack Mode

Enumeration, one of:

  • IMMEDIATE

  • AUTO

  • MANUAL

  • DUPS_OK

The JMS standard session ACK mode to use when consuming a message

 

Selector

String

The JMS selector to filter incoming messages

 

Inbound content type

String

The content type of the message body

 

Inbound encoding

String

The inboundEncoding of the message body

 

Number Of consumers

Number

The number of concurrent consumers that will be used to receive JMS Messages

4

 

==== Listener Response Parameters These parameters set the response message to be automatically sent to the replyTo Destination. The response message is automatically sent when the Lisener flow completes successfully. If the flow execution fails, then depending on the configured ACK mode, the message may be negative acknowledged ("NACKed"). [%header%autowidth.spread]

| Name | Type | Description | Default Value | Required | Body a| Any | Expression to set the body of the response Message | #[payload] |   | Jms Type a| String | Expression to set the JMSType identifier header of the response Message | |   | Correlation Id a| String | Expression to set the JMSCorrelationID header of the response Message | |   | Send Content Type a| Boolean | The JMS Message setting to determine if the body content type will be sent as a property | true |   | ContentType a| String | The content type of the response message's body | |   | Send Encoding a| Boolean | The JMS Message setting to determie if the body outboundEncoding of the response Message should be sent as a Message property in the received Message | true |   | Encoding a| String | The encoding of the response Message's body | |   | Reply To a| [JmsDestination] | The replyTo setting for the response message. Note, this does not replace the received message's replyTo value. Instaed it sets the replyTo field in the new response message. | |   | User Properties a| [JmsxProperties] | Expression to set the JMS user properties in the received JMS message | |   | JMSX Properties a| [JmsxProperties] | Expression to set the JMSX properties in the received JMS Message | |   | Persistent Delivery a| Boolean | Whether or not the delivery should be done with a persistent configuration | |   | Priority a| Number | The default JMSPriority value to be used when sending the response message | |   | Time To Live a| Number | Defines the default time the response message remains in the broker before it expires and is discarded | |   | Time To Live Unit a| Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS | Time unit to be used in the timeToLive configurations | |   | Disable Message Id a| Boolean | If true; the Message will be flagged to avoid generating its MessageID | |   | Disable Message Timestamp a| Boolean | If true; the Message will be flagged to avoid generating its sent Timestamp | |   | Delivery Delay a| Number | Only used by JMS 2.0. Sets the delivery delay to be applied in order to postpone the Message delivery | |   | Delivery Delay Unit a| Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS | Time unit to be used in the deliveryDelay configurations of the response message | |  

| Transactional Action a| Enumeration, one of:

  • ALWAYS_BEGIN

  • NONE | The type of beginning action that sources can take regarding transactions from the response message. | NONE |   | Transaction Type a| Enumeration, one of:

  • LOCAL

  • XA | The type of transaction to create from the response message. Availability will depend on the runtime version. | LOCAL |   | Redelivery Policy a| [RedeliveryPolicy] | Defines a policy for processing the redelivery of the same response message | |   | Reconnection Strategy a| * [reconnect]

    • [reconnect-forever] | A retry strategy in case of connectivity errors when sending the response message | |  

==== Output [cols=".50%,.50%"]

| Type a| Any | Attributes Type a| [JmsAttributes]

==== For Configurations. * Config  

== Types === Redelivery Policy

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Max Redelivery Count a| Number | The maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message | | | Use Secure Hash a| Boolean | Whether to use a secure hash algorithm to identify a redelivered message | | | Message Digest Algorithm a| String | The secure hashing algorithm to use. If not set, the default is SHA-256. | | | Id Expression a| String | Defines one or more expressions to use to determine when a message has been redelivered. This property may only be set if useSecureHash is false. | | | Object Store a| [ObjectStore] | The object store where the redelivery counter for each message is going to be stored. | |

=== Reconnect

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Frequency a| Number | How often (in ms) to reconnect | | | Count a| Number | How many reconnection attempts to make | |

=== Reconnect Forever

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Frequency a| Number | How often (in ms) to reconnect | |

=== Jms Destination

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Destination a| String | | | x | Destination Type a| Enumeration, one of:

  • QUEUE

  • TOPIC | | QUEUE |

=== Jmsx Properties

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Jmsx User ID a| String | | | | Jmsx App ID a| String | | | | Jmsx Delivery Count a| Number | | | | Jmsx Group ID a| String | | | | Jmsx Group Seq a| Number | | | | Jmsx Producer TXID a| String | | | | Jmsx Consumer TXID a| String | | | | Jmsx Rcv Timestamp a| Number | | |

=== Reconnection

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Fails Deployment a| Boolean | When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy | | | Reconnection Strategy a| * [reconnect] * [reconnect-forever] | The reconnection strategy to use | |

=== Active MQ Connection Factory Configuration

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Broker Url a| String | | vm://localhost?broker.persistent=false&broker.useJmx=false | | Enable Xa a| Boolean | | false | | Initial Redelivery Delay a| Number | | 1000 | | Redelivery Delay a| Number | | 1000 | | Max Redelivery a| Number | | 0 |

=== Topic Consumer

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Durable a| Boolean | | false | | Shared a| Boolean | | false | | No Local a| Boolean | | false | | Subscription Name a| String | | |

=== Default Caching

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Session Cache Size a| Number | | | | Cache Producers a| Boolean | | true | | Cache Consumers a| Boolean | | true |

=== Jndi Connection Factory

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Connection Factory Jndi Name a| String | | | x | Lookup Destination a| Enumeration, one of:

=== Jndi Name Resolver Provider

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Custom Jndi Name Resolver a| One of:

=== Jndi Name Resolver Properties

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Jndi Initial Context Factory a| String | | | x | Jndi Provider Url a| String | | | | Provider Properties a| Object | | |

=== Simple Jndi Name Resolver

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Context Factory a| Any | | | | Jndi Initial Factory a| String | | | | Jndi Provider Properties a| Object | | | | Jndi Provider Url a| String | | |

=== Cached Jndi Name Resolver

[%header%autowidth.spread]

| Field | Type | Description | Default Value | Required | Context Factory a| Any | | | | Jndi Initial Factory a| String | | | | Jndi Provider Properties a| Object | | | | Jndi Provider Url a| String | | |

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+