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: |
| |||||||
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: |
| |||||||
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. Example:Â TestSubscription 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.
Example:Â
| |||||||
Control Destination | Required. The JNDI lookup name of the control JMS destination. Example: JMSTestServer@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:
Default value:Â Queue | |||||||
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:
| |||||||
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. | |||||||
Message Acknowledge Mode | A message acknowledgment mode for non-transacted sessions. Valid options are:
For a description of these modes, go to http://docs.oracle.com/javaee/6/tutorial/doc/bncfu.html#bncfw Example: AUTO_ACKNOWLEDGE | |||||||
Processing Mode | A mode of message processing (Synchronous or Asynchronous).
Default value:Â Synchronous | |||||||
Number of retries | The maximum number of attempts the Snap must make to fetch JMS messages when there is a network failure. Example:Â 3 Default value:Â 0 | |||||||
Retry interval (milliseconds) | The minimum time in milliseconds for which the Snap must wait before attempting recovery from a network failure. Example: 1500 Default value: 1000 | |||||||
Snap Execution | Select one of the following three modes in which the Snap executes:
Default Value:Â Execute only |
Example
Guaranteed Delivery with JMS Snaps
To achieve guaranteed delivery in a JMS Snap pipeline:
- Start JMS Consumer with Message Acknowledge mode as CLIENT_ACKNOWLEDGE and Processing mode as Synchronous.
- Attach a JMS Acknowledge Snap at the end of the pipeline.
- 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
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.