JMS Source

JMS Source activity provides an ability to specify a message of a queue or topic of a JMS Server as a source. JMS provider is a messaging system that implements JMS interfaces and provides administrative and control features. JMS clients are the programs or components written in the Java programming language that produce and consume messages. 

Prerequisites
JMS Provider activity must be created before creating JMS Source activity.

Steps to create a JMS Source Activity

  1. Click Configure > SOURCES > JMS Source.
  2. Click CREATE JMS Source.
  3. On Create JMS Source screen, enter the name and description of the new JMS Source in the Name and Description fields respectively.



  4. Select the JMS Provider activity in the JMS Provider field.
  5. Select the connection type as either QUEUE or TOPIC in the Connection Type field.
  6. Select Durable Subscriber check box, if the JMS Subscriber is durable. If a client needs to receive all the messages published on a topic, including the ones published while the subscriber is inactive, it uses a Durable Subscriber. This check box is enabled only if the connection type is TOPIC.
  7. Type the subscriber ID in the Subscriber ID field.
  8. Type the name of queue or topic as configured in the JMS Server in the Queue Or Topic Name field.
  9. Select the type of message, which you want to fetch, in the Message Type field. You can select :
    1. Text
    2. Byte
    3. Both
  10. If you want to select a specific message from the JMS Server, type the message selector in the Message Selector field.


    The message selector is used to specify the filter criterion to receive a message that you are interested in. The messages can be filtered based on only header references and properties references of the message. The message selector uses SQL92 query syntax to define the filter criteria. SQL92 is widely used to query the entire standard databases (Oracle, SQL Server). The only difference between database query and message selector query is that message selector uses only a part of the query after the where clause.

    The following message selector select messages with a message type of car, color blue, and weight greater than 2500 pounds: 

    JMSType = 'car' AND color = 'blue' AND weight > 2500 

    The following message selector selects message with the property Sport with value either Basketball or Football. 
    Sport in ('Basketball','Football')

  11. Type the time in seconds in the Time Out field. If any message is not received in this interval, process flow execution will be stopped. If the Time Out field is left blank, JMS Source activity checks for the specified message and if message is not available, process flow is aborted, without waiting for the message.
  12. Enter the username and password required to connect to JMS Server in the UserName and Password fields respectively. Then, re-enter the password in the Confirm Password field.

  13. Expand Advanced Properties and select the project of the activity in the Project field.


  14. Click the Save button.

    You can verify the JMS Source activity at design time. Click Test to verify the values in the JMS ProviderConnection Type and Queue/Topic Name fields.