Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 9 JMS Palette : JMS Queue Receiver

JMS Queue Receiver
Process Starter
Starts a process based on the receipt of a message for the specified JMS queue.
Configuration
The Configuration tab has the following fields.
The JMS connection. See JMS Connection for more information about creating a JMS connection.
Note: If you are using TIBCO Enterprise Message Service as your JMS provider, you can use the Browse button next to this field after specifying a valid connection in the JMS Connection field. The Browse button displays a list of configured destinations in the JMS server that are appropriate for this activity.
Text — The message is a java.lang.String.
Client — the message will be acknowledged at a later point by using the Confirm activity. If the message is not confirmed before the process instance ends, the message is redelivered and a new process instance is created to handle the new incoming message. Ensure that your process definition confirms the message when using this acknowledge mode.
Note — In the TIBCO ActiveMatrix BusinessWorks 5.10 release, there is a change in the behavior of this feature. Now only the messages that are not confirmed, will be redelivered.
Transactional — this mode is used when a transaction that can process JMS messages is included in the process definition. The message is acknowledged when the transaction commits. See TIBCO ActiveMatrix BusinessWorks Process Design for more information about creating transactions that JMS activities can participate in.
Local Transactional — this mode is used when a transaction involves only JMS messages. See TIBCO ActiveMatrix BusinessWorks Process Design for more information about creating transactions that JMS activities can participate in.
Misc
The Misc tab contains the following fields:
See TIBCO ActiveMatrix BusinessWorks Process Design for more information about controlling the execution order of process instances and about XPath expressions.
Load-Balancing of Incoming Messages
One common application of a JMS queue is to distribute queue messages across multiple receivers, thus balancing the processing of the messages on the queue. To achieve this goal, both the JMS server and TIBCO ActiveMatrix BusinessWorks must be properly configured. The JMS server must allow the queue messages to be distributed across multiple receivers. For example, in TIBCO Enterprise Message Service, the exclusive property on the queue controls whether messages can be delivered across receivers or not. In TIBCO ActiveMatrix BusinessWorks, the process definition containing the JMS Queue Receiver must be deployed across multiple process engines. This creates multiple queue receivers for the same queue.
When balancing incoming messages across TIBCO ActiveMatrix BusinessWorks engines, you should ensure that one engine does not attempt to accept and confirm a large number of incoming messages before other engines can receive the messages. In general, most JMS servers balance the load by distributing messages in a round-robin fashion to all queue receivers. However, there are situations that can cause an uneven distribution of messages across queue receivers. If you set the Acknowledge Mode field to "Auto" on the Configuration tab of the JMS Queue Receiver, the process starter confirms messages as it receives them. When process engines are started at different times, this can lead to one process engine receiving all queue messages and paging them to disk, depending upon how the engine’s Max Jobs and Activation Limit properties are set when the engine is deployed.
If you are using TIBCO Enterprise Messaging Service, you can avoid this problem by setting the acknowledge mode to TIBCO EMS Explicit and then use the Flow Limit property in the deployment configuration to control the number of process instances created by the process starter.
If you are not using TIBCO Enterprise Messaging Service, set the Acknowledge Mode field to "Client". In this mode, a process engine can only receive as many messages as it has sessions specified in the Max Sessions field. Once a process engine reaches the maximum number of sessions, another process engine can begin to accept incoming messages. A process engine cannot receive more messages until the messages have been acknowledged by using the Confirm activity. Once the message is acknowledged, the session is released and the process engine can accept a new message.
Advanced
The Advanced tab has the following fields.
Specifies the polling interval to check for new messages. This default interval is set by the custom engine property bw.plugin.jms.receiverTimeout. If no value is specified for the property, the default polling interval is one second.
Note: The Precreate Transactions feature should be used only with IBM MQ Websphere.
Output Editor
The Output Editor tab defines the schema to use for incoming messages whose message type is Map, Stream, or XML Text. Map messages are name/value pairs, and the schema allows you to define the structure of the incoming message. Once defined, the schema on the Output Editor tab becomes the structure used for the body of the message displayed on the Output tab.
See Appendix A, Specifying Data Schema for a complete description of using the Output Editor tab.
Output
The output for the activity is the following.
The message header fields for the message. See JMS Properties for more information about message header fields.
The message properties for the message. See JMS Properties for more information about message properties.
Note: The DynamicProperty will overwrite the value of a property (with the same name) added using the JMS Application Property.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved