Skip to Content

JMS connector Poll activities in Jitterbit Design Studio

JMS Poll

A JMS Poll activity allows receiving of one or more messages from a JMS queue for Jitterbit operation processing. When running multiple Jitterbit private agents performing poll activities on the same JMS Queue, the messages will be delivered in a round-robin fashion. This activity can be put on a scheduler.

attachment

  • Queue Name: The name of the queue to receive the messages from. The queue name supports the use of project and global variables in its definition, allowing for dynamic configuration of the activity.

  • Message Type: Supports TEXT and BYTE message types. Default type is TEXT. For messages of the BYTE type_,_ you need to apply the Jitterbit function Base64Decode() on the message payload in the Response Transformation.

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

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

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

    <trans>
    WriteToOperationLog(String(Base64Decode((pollMessageResponse$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.

  • Messages To Receive: Number of messages to browse from the queue. A value of zero (0) will retrieve all messages from the queue (one at a time). Received messages are removed from the queue. Default: 1.

  • Receive Timeout (ms): The timeout (in milliseconds) for the Receive activity. This call blocks until either a message arrives, the timeout expires, or this message consumer is closed. A timeout of zero never expires, in which case the call blocks indefinitely. Default: 30000 ms.

  • 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, the session automatically acknowledges each message received by the application.

    • 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.

Tip

As of Jitterbit version 8.14, you can use project or global variables in the text fields of the JMS Poll activity by using the standard [variable] notation enclosed within brackets. For more information and examples, see Global variables.