Setting JMS Message Selectors

You can set JMS Message Selectors in TIBCO Business Studio.

Procedure

  1. Start the EMS server.
  2. Open the project containing Subscription Services in TIBCO Business Studio.
  3. Specify JMS message selectors.
    1. In the Transports tab of Subscription Service, expand the DefaultJMSTopicSession tree, and select a SubscriptionServiceEndPoint.
    2. In the EndPoint Configuration panel, specify the selector in the Message Selector field. For example, type (Branch='Boston' OR Branch='East Coast' OR Branch='ALL') AND ((SalesUpper>=62 AND SalesLower<=62) OR Sales volume='ALL').
    3. Repeat step a and step b to specify a JMS selector for another Subscription Service. For example, type (Branch='New York' OR Branch='East Coast' OR Branch='ALL') AND ((SalesUpper>=90 AND SalesLower<=90) OR SalesVolume='ALL') in the Message Selector field for Subscription Service named mysub2.
  4. Select Simple File Transfer from the Transfer Mode list.
  5. Start Subscription Service and connect to the EMS server.
  6. Start Publication Service and connect to the EMS server. Publication Service uses the Simple File Transfer mode. The polling method is JMS (topic) message.
  7. Send a JMS trigger message to Publication Service. For example, send the following JMS message: fileName=File_name1,Branch='East Coast',SalesUpper=70,SalesLower=50.

Result

After receiving a trigger message, Publication Service starts transferring the files to Subscription Services specified in the JMS message selectors in step 3. The fileName, Branch, SalesUpper, and SalesLower properties are included in the outgoing data messages. In this example, mysub1 matches the conditions in the JMS message. Publication Service routes the messages to mysub1.

See the TIBCO Enterprise Message documentation about configuring EMS servers, creating EMS routes, constructing JMS messages, and specifying JMS message selectors.