JMS Consumer

From PresenceWiki
Jump to: navigation, search

The JMS Consumer node is designed to receive and handle incoming JMS Messages within a Presence Task. Typically such messages will be sent from another Presence Task, or a separate part of your enterprise, via a messaging broker such as Apache ActiveMQ, FUSE, OpenJMS, etc.

JMS Consumer Editor

This is an overview of the JMS Consumer Editor. For more detailed discussion about JMS, MOM and enterprise messaging in general, please see the Wikipedia entries.

Connection and Destination

http://www.international-presence.com/wikidocs/images/jms_consumer_1.png


The first Connection tab allows you to specify the manner in which Presence should connect to your JMS vendor. This can either be done by referencing a JNDI resource and specifying a Lookup Name, or by directly entering the class name and setting the appropriate properties. Please refer to your JMS vendor for implementation details.

http://www.international-presence.com/wikidocs/images/jms_consumer_2.png


The Destination Tab specifies the Topic or Queue that this node should connect to in order to receive messages. As with the JMS Producer Node Editor, this can be a JNDI reference, a hard-coded (and vendor specific) name, or an incoming Presence reference.

Incoming Message Data

http://www.international-presence.com/wikidocs/images/jms_consumer_3.png


This tab allows the user to receive a test message in order to learn and store the incoming field names. In order to receive a test message, click the "Receive Message Data" button. Progress information will be displayed in the text area beneath the button, and additional fields will be populated in the list to the left of the pane.

Message Selector

http://www.international-presence.com/wikidocs/images/jms_consumer_4.png


A Message Selector is used to filter messages which are important to the application. To set the Message Selector, drag the appropriate Properties or Headers into the text area labelled "Message Selector Syntax". You will be presented with a Condition input dialog similar to the Decision Node Editor. To edit a clause in the condition, hold down the control key and click the clause.

Receive Options

Receive Strategy

http://www.international-presence.com/wikidocs/images/jms_consumer_5.png


Three options are available which determine the manner in which the Presence Task should receive Messages:

Receive Messages Individually - Task Execution will continue after one message is received for each Message Selector. For example, if your Message Selector specifies that the JMS Message ID should match a data table column which has 5 rows, 5 messages will be expected. The contents of these messages will be appended to the data table, automatically assigning the values to the correct incoming row of data.

Receive Messages in Batches - Any outstanding messages currently on the Queue or Topic will be consumed, the data table will be appended appropriately (again matching rows to the appropriate criteria) and Task execution will continue. If no messages are available for consumption the Task will stop (or return to an earlier path).

Receive Messages Indefinitely - The Node will act as a trigger, and each incoming Message will cause the Task to continue along the appropriate path. In this instance the JMS consumer acts like a While Node.

Durable Topic Subscriptions

Durable Subscribers will continue to receive messages which were sent when the Consumer was inactive (i.e. not running). In order to use this option, you must specify a Subscriber Name (this is arbitrary but should be unique).


See Also

Task Elements : Action Task Elements : JMS Consumer

Send Email | Send SMS | Send Fax | Broadcast Messages
Read Text File | Read Binary File | Write Text File | Write Binary File | Parse File Action
Rename File | Copy File | Delete File | Parse File Action
Generate Bar Code | Read Bar Code
Dynamic Task Call | Call Native Program | FTP Upload | Scorecard Collector | Create Graph | AS400 Action
Socket Client Action | Socket Server Action
JMS Producer | JMS Consumer


Task Elements | Resources