Creating RA JMS Agent Sender Jobs

You create RA JMS Agent Sender Jobs by selecting a Connection object and a queue or topic. You can then define the message and specify other settings.

To create an RA JMS Agent Sender Job:

  1. Add a Job object of type JMS > SENDER and select your RA JMS Agent solution Agent object in the Host field on the Attributes page.
  2. Open the JMS Sender page.
  3. Fill-in the fields on the right side of the screen.
    • Connection
    • An RA JMS Agent Connection object.

      Important !

      Make sure the Connection object uses the same provider as the Agent object in the Host field on the Attributes page. If the Provider names are different, the job will fail with an 'com.uc4.extensibility.iface.CITServerException: Provider does not exist: <Provider Name>' error within the Agent log.

    • Queue/Topic
    • Use the radio button control to select a Queue or Topic for your Job. The drop-down lists for the Queue or Topic fields include the queue or topic names defined in the selected Connection object. You can:

      • Select one of these names.
      • Select one of these names and edit it.
      • Type in a custom name.

      With Apache ActiveMQ, you can specify dynamicQueues/<queue name> as the queue name and it will create a queue with that name you specify as <queue name>. If you use this feature, do not check the Dynamic Queue/Topic box. If you do, your queue will be named dynamicQueues/<queue name> instead of just <queue name>.

      These editable value fields can include object variables in the format &<variable name>. The values of these object variables will be replaced at runtime.

    • Dynamic Queue/Dynamic Topic
    • Supported for TIBCO EMS and Apache ActiveMQ providers. When checked, if you enter a queue or topic name that does not exist, the RA JMS Agent will create the queue or topic for you. That queue or topic will exist as long as: 

      • There are messages on the queue or topic.
      • A message consumer is listening on the queue or topic.

      This field can also be used to enter the physical name of the queue or topic rather than the JNDI registered name. For example, if you have a queue or topic name that's hidden and you only want others to use the physical name that is not available through JNDI look-up.

    • Wait for Response
    • When this checkbox is checked: 

      • The Job creates a temporary unique queue each time it runs. The queue stays active until it gets a response.
      • The Parsing page becomes active.
      • This is because parsing is normally available only for Receiver Jobs. But when Sender Jobs wait for a responses, parsing is available. Since response parsing is done exactly the same in this case as it is done for Receiver Jobs, the documentation is the same.

    • Timeout
    • An optional number of seconds before timing out if a response is not received.

    • Fail Job on Timeout
    • Determines whether or not to fail the Job if the timeout seconds are reached.

    • Include Message Headers and Properties in the Job Report
    • When checked, the RA JMS Agent includes all headers and properties of the message in the Job report. In the example text below, headers and properties are included in a Job report.

      2017-03-05 09:47:22  Headers

      2017-03-05 09:47:22    DisableMessageID = false

      2017-03-05 09:47:22    DisableMessageTimestamp = false

      2017-03-05 09:47:22    DeliveryMode = NON PERSISTENT

      2017-03-05 09:47:22    CorrelationID = 755

      2017-03-05 09:47:22  Properties

      2017-03-05 09:47:22    Custom = thirtyeight

    • Include Message Payload in the Job Report
    • When checked, the RA JMS Agent includes the message payload in the Job report as shown in the example below.

      2017-03-05 09:47:22  ------------ Message Payload ------------

      2017-03-05 09:47:22  Operation_Complete

      2017-03-05 09:47:22  -----------------------------------------

      When this checkbox and the Include Message Headers and Properties in the Job Report checkbox above are both checked, the headers, properties, and message payload are all saved to the same Job report. If the payload is from a file, only the name and size of the file will appear in the Job report as shown in the example below.

      2017-03-03 09:48:31  File Name: /home/JMS_Agent/bin/TRACE_RA_JMS.TXT File Size: 15098

  4. Define the message definition on the Definition page.
  5. To define the message, select a type from the Message Type field. The message types are:

    • Plain Text
    • XML
    • JSON
    • YAML
    • Map
    • Bytes
    • Stream

    Subtopics for each follow.

  6. Optionally override Connection object headers and/or properties or define them for the Job. For more information, see Defining Headers and Properties for RA JMS Agent Sender Jobs.
  7. Click Save to save the Job.

Using the &JMSMessageID# Task Variable in Workflows

When a message is sent, the JMS provider code inserts a unique message ID into the message. When the send call to the provider returns, the RA JMS Agent gets the ID from the message and sets the task variable &JMSMessageID#. When you include a Sender Job in an Automation Engine Workflow, you can use the &JMSMessageID# task variable in the Workflow's tasks that follow or in the post process script of the Sender Job.