Integration Server 10.7 | JMS Client Development Guide | Working with JMS Triggers | Creating a JMS Trigger
 
Creating a JMS Trigger
 
Adding JMS Destinations and Message Selectors to a JMS Trigger
Adding Routing Rules to a Standard JMS Trigger
When you create a JMS trigger, keep the following points in mind:
*The JMS connection alias you want Integration Server to use to obtain connections to and receive messages from the JMS provider must already exist. Although a JMS connection alias does not need to be enabled at the time you create the JMS trigger, the JMS connection alias must be enabled for the JMS trigger to execute at run time.
Note:
If you want to manage destinations and durable subscribers on a webMethods Broker that is used as a JMS provider, the JMS connection alias must be enabled when you work with the JMS trigger.
*If you use a JNDI provider to store JMS administered objects, the Connection Factories that you want the JMS trigger to use to consume messages must already exist.
*If you use a JNDI provider to store JMS administered objects and the JMS provider is not webMethods Broker, the destinations (queues and topics) from which this JMS trigger will receive messages must already exist.
Note:webMethods Broker is deprecated.
*If the JMS provider is webMethods Broker or Software AG Universal Messaging, the destinations (queues and topics) from which the JMS trigger receives messages do not need to exist before you create the JMS trigger. Instead, you can create destinations using the JMS trigger editor. You can also create, modify, and delete durable subscribers via the JMS trigger. For more information, see Managing Destinations and Durable Subscribers on the JMS Provider through Designer .
*If the JMS provider is Universal Messaging, administered objects can be created on demand. If you specify a destination that does not exist in the JNDI namespace and the JMS connection alias used by the JMS trigger is configured to create administered objects on demand, Integration Server creates the destination the first time the JMS trigger starts. For more information about creating administered objects on demand, see webMethods Integration Server Administrator’s Guide.
*The transaction type of the JMS connection alias determines whether or not the JMS trigger is transacted (that is, it receives and processes messages as part of a transaction). Transacted JMS triggers have slightly different properties and operate differently than non-transacted JMS triggers. For more information about building a transacted JMS trigger, see Building a Transacted JMS Trigger.
*The trigger service that you want to specify in the routing rule must already exist on the same Integration Server on which you create the JMS trigger. For more information, see Standard JMS Trigger Service Requirements.
*A standard JMS trigger can contain multiple routing rules. Each routing rule must have a unique name. For more information about using multiple routing rules, see Building Standard JMS Triggers with Multiple Routing Rules.
*A standard JMS trigger that contains an All (AND) or Only one (XOR) join can only have one routing rule and cannot have a batch processing size (Max batch messages property) greater than 1. A JMS trigger with an Any (Or) join can have multiple routing rules. For more information about batch processing, see About Batch Processing for Standard JMS Triggers.
*Integration Server uses a consumer to receive messages for a JMS trigger. This consumer encapsulates the actual javax.jms.MessageConsumer and javax.jms.Session.
*To create a JMS trigger
1. In the Package Navigator view of Designer, click File > New > JMS Trigger.
2. In the New JMS Trigger dialog box, select the folder in which you want to save the JMS trigger.
3. In the Element name field, type a name for the JMS trigger using any combination of letters, numbers, and/or the underscore character.
4. Click Finish.
5. In the JMS connection alias name field in the Trigger Settings tab, click .
Note:
A transacted JMS connection alias cannot be assigned to a JMS trigger if a cluster policy is applied to the connection factory used by the JMS connection alias.
6. In the Select a JMS connection alias for triggerName dialog box, select the JMS connection alias that you want this JMS trigger to use to receive messages from the JMS provider. Click OK.
Designer sets the Transaction type property to match the transaction type specified for the JMS connection alias.
If a JMS connection alias has not yet been configured on Integration Server, Designer displays a message stating the JMS subsystem has not been configured. For information abut creating a JMS connection alias, see webMethods Integration Server Administrator’s Guide.
7. In the JMS trigger type list, select one of the following:
Select
To...
Standard
Create a standard JMS trigger.
SOAP-JMS
Create a SOAP-JMS trigger.
8. Under JMS destinations and message selectors, specify the destinations from which the JMS trigger will receive messages. For more information, see Adding JMS Destinations and Message Selectors to a JMS Trigger.
Note:
For SOAP-JMS triggers, you can specify one destination only.
9. If you selected multiple destinations, select the join type. The join type determines whether Integration Server needs to receive messages from all, any, or only one of destinations to execute the trigger service.
Select...
If you want...
All (AND)
Integration Server to invoke the trigger service when the trigger receives a message from every destination within the join time-out period. The messages must have the same activation.
Any (OR)
Integration Server to invoke the trigger service when the trigger receives a message from any of the specified destinations.
This is the default join type.
Note:
Using an Any (OR) join is similar to creating multiple JMS triggers that listen to different destinations. While a JMS trigger with an Any (OR) join will use fewer resources (a single thread will poll each destination for messages), it may cause a decrease in performance (it may take longer for one thread to poll multiple destinations).
Only one (XOR)
Integration Server to invoke the trigger service when it receives a message from any of the specified destinations. For the duration of the join time-out period, the Integration Server discards any messages with the same activation that the trigger receives from the specified destinations.
10. If this is a standard JMS trigger, under Message routing, add routing rules. For more information, see Adding Routing Rules to a Standard JMS Trigger.
11. In the Properties view, set properties for the JMS trigger.
12. Enter comments or notes, if any, in the Comments tab.
13. Click File > Save.
Related Topics
Adding JMS Destinations and Message Selectors to a JMS Trigger
Modifying Destinations or Durable Subscribers via a JMS Trigger in Designer
Adding Routing Rules to a Standard JMS Trigger
Enabling or Disabling a JMS Trigger
Setting an Acknowledgement Mode
About Join Time-Outs
About Execution Users for JMS Triggers
About Message Processing
Fatal Error Handling for Non-Transacted JMS Triggers
Transient Error Handling for Non-Transacted JMS Triggers
Adding Routing Rules to a Standard JMS Trigger