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 textboxes of Name and Description respectively.



  4. Select the JMS Provider activity from the drop-down list of JMS Provider.
  5. Select the connection type as either QUEUE or TOPIC from the drop-down list of Connection Type.
  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 text box.
  8. Type the name of queue or topic as configured in the JMS Server in the Queue Or Topic Name text box.
  9. Select the type of message, which you want to fetch, from the Message Type drop-down list. 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 text box.


    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 text box. 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. Follow the steps below based on whether you are using Hashicorp Vault to fetch the secrets (credentials) or you want to enter the secrets manually.

    To use Hashicorp Vault, you must enable Config Management feature and you may also need to do project mapping. For more details, refer to this page.

  13. To fetch the secrets from the Hashicorp Vault, do the followings:

    You can choose to use Hashicorp Vault for all or a specific field that need to contain secret.

    1. In the UserName field, enter the variable in the following format:
      ${Vault:<Key1>}
      Where, <Key1> is the key assigned to the username in the Hashicorp Vault. 

      Each secret is maintained as a key-value pair in Hashicorp Vault.

    2. Select the Use Vault checkbox if you want to use Vault for retrieving the password.

    3. In the Password field, enter the variable in the following format:
      ${Vault:<Key2>}
      Where, <Key2> is the key assigned to the password in the Hashicorp Vault.
  14. To enter the secrets manually, do the followings:
    1. In the UserName field, enter the username to connect to JMS Server.
    2. In the Password field, enter the password.
    3. In the Confirm Password field, re-enter the password.
  15. Expand Advanced Properties and select the project of the activity from the drop-down list of Project.


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