Skip to Content

JMS Connector Send and Publish Activities

JMS SendOrPublish

A JMS SendOrPublish (Send/Publish) activity allows sending of messages to a JMS Queue or JMS Topic. This activity can be put on a scheduler.

attachment

  • Queue/Topic: Indicates the message is to be sent to a queue or topic.
  • Destination Name: The name of the JMS Queue or JMS Topic to send the messages to. The destination 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 functions Base64EncodeFile() or Base64Encode() on the message body in the Request Transformation.

For example, to read a binary file from a source and return the contents as a base64-encoded string:

<trans>
Base64EncodeFile("<TAG>Sources/Binary Source</TAG>");
</trans>

To encode text data to be stored as a byte array in a JMS queue:

<trans>
Base64Encode("This is a text statement going into the JMS queue as binary");
</trans>
  • Delivery Mode: Supports either PERSISTENT or NON_PERSISTENT delivery modes. Default is PERSISTENT.

    This value is applied for all messages sent to the specified destination. To override the Delivery Mode on an individual message basis, the message header JMSDeliveryMode must be specified in the Request Transformation. The JMSDeliveryMode header takes an integer value, with NON_PERSISTENT as 1 and PERSISTENT as 2:

attachment

  • Priority: The priority of the message. The JMS API defines ten levels of priority value, with 0 as the lowest priority and 9 as the highest. Default is 4.

    This value is applied for all messages that are sent to the specified destination. To override the Priority on an individual message basis, the message header JMSPriority must be specified in the Request Transformation:

attachment

  • Time to Live (ms): The time (in milliseconds) to which the messages live in the queue. The provider dequeues the message after the time expires. Default is 0, which means that the messages will live forever.
  • Transacted Session: Allows creating of a transacted session, in where the messages would be sent when the session is committed.

Tip

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. See Global Variables.