Skip to Content

JMS Connector Listen Activities

JMS Listen

A JMS Listen activity allows listening on a queue for messages. Messages are received by the JMS Listen activity asynchronously. A new message is only received once the processing of any prior message completes.

attachment

  • Queue Name: The name of the queue to receive the messages from asynchronously. The queue name supports the use of project and global variables in its definition, allowing for dynamic configuration of the activity.
  • Message Type: Use the menu to select the message type, either TEXT or BYTE. By default, this field is set to TEXT. When this field is set to BYTE, you need to apply the Jitterbit function Base64Decode() on the message payload in the response transformation.

For example, to write a message body to a file after decoding with the file name listen-binary.png:

<trans>
WriteFile("<TAG>Targets/Decode Binary Target</TAG>",
  Base64Decode(listenMessageResponse$payload$message.messageBody$),
  "listen-binary.png");
</trans>

For decoding text data stored as a byte array in a JMS queue:

<trans>
WriteToOperationLog(String(Base64Decode((listenMessageResponse$payload$message.messageBody$))));
</trans>
  • Message Selector:An expression used to filter the messages, by header field and property references. It cannot reference message body values. The syntax is based on a subset of the SQL92 conditional expression syntax. If the value of a message selector is an empty string, the value is treated as a null and indicates that there is no message selector for the message consumer. The message selector supports the use of project and global variables in its definition, allowing for dynamic configuration of the activity.
  • Transacted Session: When set to TRUE (default), each message received is automatically acknowledged.
  • Acknowledge Mode: When Transacted Session is set to FALSE, use the menu to select the acknowledgment mode, either AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE:

    • AUTO_ACKNOWLEDGE: When selected, each message received is automatically acknowledged.

    • DUPS_OK_ACKNOWLEDGE: When selected, the acknowledgment of messages is delayed until a convenient time (usually resulting in messages being acknowledged in batches). When using this mode, the server might redeliver messages. This mode reduces session overhead.

When running an operation with this activity, if the connection to the JMS server is interrupted, the agent will try to reconnect to the JMS server every 1 minute, for a maximum of 120 retries.

To disable the JMS Listener, set the property "start.component.listener=false" in the Jitterbit Private Agent configuration file jitterbit-agent-config.properties.