JMS Consumer

JMS Consumer

On this Page

Snap type:

Read


Description:

This Snap fetches the Java Message Service (JMS) messages from a JMS destination and acknowledges them.

Prerequisites:

N/A


Support and limitations:
  • Works in Ultra Tasks.
  • Processes only the following types of messages:
    • TEXT
    • MAP
    • BYTE
    • STREAM
      For any other message type, the Snap throws the exception – Unsupported Format.
Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring JMS Accounts for information on setting up this type of account.


Views:
InputThis Snap has at most one optional document input view.
OutputThis Snap has exactly one document output view.
ErrorThis Snap has at most one document error view and produces zero or more documents in the view.

Settings

Label


Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Durable Subscriber


A Boolean property to make the JMS Consumer Snap a durable subscriber.
A durable subscriber consumer wants to receives the messages that were sent when the subscriber is disconnected from the messaging system, requiring the messaging provider to cache publications until the subscriber is back up.

Client ID


Required. A client ID to be applied to the JMS connection inside this JMS consumer. (This property is only used if Durable Subscriber is checked).

Example: 0001

The values can be passed dynamically using the pipeline parameters but not via the upstream.

Subscription Name


Required. The name of the subscription to be used if Durable Subscriber is checked.

ExampleTestSubscription

The values can be passed dynamically using the pipeline parameters but not via the upstream.

Destination


Required. The Java Naming and Directory Interface (JNDI) lookup name of the regular JMS destination.

This destination is used to fetch regular JMS messages.

  • The topic/queue name specified is case sensitive. Ensure that the letter case for Destination is the same in the Producer and Consumer Snaps.
  • If the topic/queue name does not exist at the Java Message Service client (such as ActiveMQ), one will automatically be created with that name.
  • When using Weblogic JMS Server, you must provide queue/topic name, the name of the module associated with the queue/topic, and the Weblogic JMS server where the queue/topic is hosted. Use the following format: 

Example

  • testserver/TestQueue
  • testserver/testmodule!testqueue
  • testserver/testmodule!testtopic
  • JMSserver-1/SystemModule-0!Queue-1

Control Destination


Required. The JNDI lookup name of the control JMS destination.
Note:  This destination is used to fetch control JMS messages to stop this JMS consumer from fetching regular JMS messages. The destination must be specified with the JMS Server Name and JNDI context path. Specify the destination in this format: JMS_Server_Name@JNDI_context_path

ExampleJMSTestServer@JNDIContextPath

The values can be passed dynamically using the pipeline parameters but not via the upstream.

Destination Type


A type of JMS destination. Valid options are:

  • Queue
  • Topic

Default valueQueue

Message Selector


A SQL92 style expression to filter the JMS messages. The message selector value can be used to filter the messages from the destination, but cannot reference the message body. A message that evaluates the expression as true will pass on to the consumer. See your providers documentation for supported expressions.

The SQS account does not support Message Selector values—it expects the value to be null. Learn more: Support for Message selectors.

Example:

  • JMSCorrelationID='1', will read messages with JMSCorrelationID value set as '1' from destination.
  • user IS NOT NULL

Message Count


Maximum messages to read before execution stops. A negative value will make this JMS Consumer run indefinitely. Set to zero to consume all the messages in the destination queue/topic and then exit.

When you validate the Snap, the Snap consumes only one message irrespective of the value in the Message count.

Message Acknowledge Mode


A message acknowledgment mode for non-transacted sessions. Valid options are:

  • AUTO_ACKNOWLEDGE - the session acknowledges the receipt of a message when a call to receive method or when the message listener returns successfully.
  • CLIENT_ACKNOWLEDGE - the client has the power when to acknowledge the message.
  • DUPS_OK_ACKNOWLEDGE - the session lazily acknowledges the delivery of messages, possibly resulting in duplicate messages if the JMS provider fails.

For a description of these modes, go to http://docs.oracle.com/javaee/6/tutorial/doc/bncfu.html#bncfw

ExampleAUTO_ACKNOWLEDGE

Processing Mode


A mode of message processing (Synchronous or Asynchronous).

  • Synchronous mode will make the consumer read the messages from the destination every 5 seconds until a 'STOP' is read or the Message Count is reached. If the consumer reads the message within 5 seconds, then it will process it and not wait every 5 seconds for the next message.
  • Asynchronous mode will make the consumer read the message from the destination when ever the message arrives until a 'STOP' is read or the Message Count is reached. 

Default valueSynchronous

Number of retries

The maximum number of attempts the Snap must make to fetch JMS messages when there is a network failure.

Example3

Default value0

Retry interval (milliseconds)

The minimum time in milliseconds for which the Snap must wait before attempting recovery from a network failure.

Example1500

Default value1000

Snap Execution

Select one of the following three modes in which the Snap executes:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default ValueExecute only



Example: Validate & Execute

Example


Guaranteed Delivery with JMS Snaps

To achieve guaranteed delivery in a JMS Snap pipeline:

  1. Start JMS Consumer with Message Acknowledge mode as CLIENT_ACKNOWLEDGE and Processing mode as Synchronous.
  2. Attach a JMS Acknowledge Snap at the end of the pipeline.
  3. The JMS Consumer will have 'JMS MessageID' passed in the header of binary document. Pass this value as the document input to JMS Acknowledge Snap.

When the pipeline starts, the consumed message is written to the output view by the JMS Consumer Snap and passed downstream for further processing. Consumer keeps waiting for a response from Acknowledge Snap. When all the processing is completed, the JMS Acknowledge at the end of pipeline will intimate JMS Consumer to acknowledge the specified message (message is identified by JMS Message ID passed) and then the JMS Consumer acknowledges the message and continues reading the next message and so on.

Snap Pack History

 Click to view/expand

Release

Snap Pack Version

Date

Type

Updates

May 2025

main31019

 

Stable

Updated and certified against the current SnapLogic Platform release.

February 2025

440patches30851

 

Latest

Improved the JMS authentication handling on the JBoss Server. Now, if the username authentication fails, SnapLogic uses the username and password as the JNDI properties to authenticate the JMS Account automatically at the backend.

February 2025

440patches30414

 

Latest

Fixed the account validation issue (across multiple threads simultaneously) in the JMS Account.

February 2025

main29887

 

Stable

Updated and certified against the current SnapLogic Platform release.

November 2024

439patches29671

 

Latest

Fixed an issue with the JMS Consumer Snap that caused it to stop receiving messages by adding a timeout policy around the JMS provider receive() method.

November 2024

439patches29329

 

Latest

Fixed an issue with the JMS Consumer Snap that displays ExecutionException when the Snap captures a connection error. Now, it routes the connection error to the error view.

November 2024

main29029

 

Stable

Updated and certified against the current SnapLogic Platform release.

August 2024

main27765

 

Stable

Updated and certified against the current SnapLogic Platform release.

May 2024

main26341

 

Stable

Updated and certified against the current SnapLogic Platform release.

February 2024

main25112

 

Stable

Updated and certified against the current SnapLogic Platform release.

November 2023

main23721

 

Stable

Updated and certified against the current SnapLogic Platform release.

August 2023

main22460

 

Stable

Updated and certified against the current SnapLogic Platform release.

May 2023

main21015

 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023

432patches20479

 

Latest

Fixed an issue where the JMS Producer Snap was previously only writing headers to the WebLogic queue. Now the Snap writes the entire document.

February 2023

main19844

 

Stable

Upgraded with the latest SnapLogic Platform release.

November 2022

main18944

 

Stable

Upgraded with the latest SnapLogic Platform release.

August 2022

main17386

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.29

main15993

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.28

main14627

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.27

main12833

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.26

main11181

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.25

main9554

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.24 Patch

4.24patches9098

 

Latest

Enhances the JMS account in the JMS Snap Pack by updating the JNDI properties (java.naming.security.principal, java.naming.security.credentials) with username and password, to support the requirements of certain JMS servers.

4.24 Patch

424patches9104

 

Latest

Fixes an issue in the JMS Consumer Snap, where different JMS SQS accounts interfere with each other while running on the same jcc node by using the AWSStaticCredentialProvider instead of the SystemPropertiesCredentialsProvider.

4.24

main8556

Stable

Upgraded with the latest SnapLogic Platform release.

4.23

main7430

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.22 Patch

422patches6992

 

Latest

Fixes the JMS Snap Pack by replacing JMS class loader for Oracle AQ (Advance Queuing).

4.22

main6403

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.21

snapsmrc542

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.20 Patch 

 jms8824

 

Latest

Fixes an issue in the JMS Consumer Snap due to which the Snap does not release the memory even after Pipeline termination, leading to huge memory spikes.

4.20 Patch

 jms8810

 

Latest

Fixes the connection leak issue in the JMS Producer Snap.

4.20 Patch 

jms8765

 

Latest

Fixes an issue with the JMS Consumer Snap that fails to successfully create durable subscribers when run in asynchronous mode.

4.20

snapsmrc535

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.19 Patch 

jms8420

 

Latest

  • Adds the following properties to the JMS Consumer and JMS Producer Snaps to enable retry and reconnect features:

    • Number of retries: Defines the number of times the Snap must re-attempt an operation before throwing a connection/network error.

    • Retry interval (milliseconds): Defines the time in milliseconds the Snap must wait between subsequent retries upon a connection/network error.

  • Enables the JMS Producer Snap to clean up stale connections.

  • Fixes the JMS Acknowledge Snap where the Snap fails unexpectedly without providing a reason.

4.19

snaprsmrc528

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.18 Patch 

jms7865

 

Latest

Fixed an issue with the JMS Consumer Snap that reinserts failed messages in the JMS queue without checking for duplicate messages.

4.18

snapsmrc523

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.17

ALL7402

 

Latest

Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.

4.17

snapsmrc515

 

Latest

Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.

4.16

snapsmrc508

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.15

snapsmrc500

 

Stable

Added HornetQ support for the JMS Producer and JMS Consumer Snaps.

4.14

snapsmrc490

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.13

snapsmrc486

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.12

snapsmrc480

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.11

snapsmrc465

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.10

snapsmrc414

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.9 Patch 

jms3305

 

Latest

Elegant error & resolution messaging for bad ConnectionFactory and bad connectionFactoryNames JNDI property

4.9

snapsmrc405

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.8 Patch 

jms2702

  

Latest

Addressed an issue with the JMS Acknowledge Snap failing to exit in Ultra mode.

4.8 Patch

jms2883

 

Latest

Addressed multiple issues regarding messages being consumed or acknowledged in JMS Consumer and Acknowledge Snaps.

4.8

snapsmrc398

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.7

snapsmrc382

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.6

snapsmrc362

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.5.1

snapsmrc344

 

Stable

Upgraded with the latest SnapLogic Platform release.

4.5

snapsmrc344

Stable

  • Resolved an issue in JMS Consumer Snap that occurred when the Snap is set with the SQS account on a client_acknowledge mode.

  • Resolved an issue in JMS Consumer Snap that occurred when the Snap was used in the middle of a pipeline.

4.4


 

Stable

  • JMS Producer: The file header is now passed through to the output view.

  • JMS Acknowledge: JMS MessageID is now optional for the input.

  • JMS Consumer: Expressions are now supported for Client ID and Subscription Name.