Use the JMSInput node to receive messages from JMS destinations. JMS destinations are accessed through a connection to a JMS provider.
This topic contains the following sections:
The JMSInput node acts as a JMS message consumer and can receive all six message types that are defined in the Java Message Service Specification, version 1.1. Messages are received by using method calls, which are described in the JMS specification.
The JMSInput node is contained in the JMS drawer of the palette, and is represented in the workbench by the following icon:
The JMSInput node receives and propagates messages with a JMS message tree. You can set the properties of the JMSInput node to control the way in which the JMS messages are received.
Message flows that handle messages that are received from connections to JMS providers must always start with a JMSInput node. If you include an output node in a message flow that starts with a JMSInput node, it can be any of the supported output nodes (including user-defined output nodes); you do not need to include a JMSOutput node. However, if you do not include a JMSOutput node, you must include the JMSMQTransform node to transform the message to the format that is expected by the output node.
If you are propagating JMS messages and creating a message flow to use as a subflow, you cannot use a standard input node; you must use an instance of the JMSInput node as the first node in order to create an In terminal for the subflow.
export MQSI_LIBPATH32=$MQSI_LIBPATH32:/usr/mqm/lib:/usr/mqm/java/lib
Configurable services are defined for a number of JMS providers. You can choose one of the predefined services, or you can create a new service for a new provider, or for one of the existing providers.
mqsireportproperties brokerName -c AllTypes -o AllReportableEntityNames -r
Use the mqsireportproperties command to view the provider properties, and the mqsichangeproperties command to set or modify the properties.
For each message that is received successfully, the JMSInput node routes the message to the Out terminal. If this action fails, the message is retried. If the retry threshold is reached, where the threshold is defined by the Backout threshold property of the node, the message is routed to the Failure terminal. You can connect nodes to the Failure terminal to handle this condition.
If an exception occurs in the failure path, the path is retried until the number of attempts is twice the Backout threshold. If that limit is exceeded, the message is put to the Backout destination.
If you have not connected nodes to the Failure terminal, the message is written to the Backout destination. If you have not specified a Backout destination, the node issues a BIP4669 error message and stops processing further input.
If the message is caught by the JMSInput node after an exception has been generated elsewhere in the message flow, the message is routed to the Catch terminal. If you have not connected nodes to the Catch terminal, the node backs out messages for redelivery until the problem is resolved, or the Backout threshold is reached. If you do not define a Backout destination, the node issues a BIP4669 error message and stops processing further input.
When you include a JMSInput node in a message flow, the value that you set for Transaction mode defines whether messages are received under sync point.
install_dir/bin/ JMSSwitch.dll XAOpenString=Initial Context,location JNDI,Optional_parms ThreadOfControl=THREAD
install_dir/bin/ JMSSwitch.dll XAOpenString=Initial Context,location JNDI,Optional_parms ThreadOfControl=THREAD
XAResourceManager: Name=Jms_Provider_Name SwitchFile=/install_dir/bin/ JMSSwitch.so XAOpenString=Initial Context,location JNDI,Optional_parms ThreadOfControl=THREADWhere:
The optional parameters are comma separated and are positional. Therefore, any parameters that are missing must be represented by a comma.
install_dir/classes/xarecovery.jar
install_dir/bin
For more information, see the System Administration Guide section of the WebSphere MQ Version 6 information center online, or the Version 5.3 book on the WebSphere MQ library Web page.
To use the same queue manager for both the broker and the JMS provider, ensure that your WebSphere MQ installation is at the minimum required level: Version 5.3 CSD12 or Version 6.0 Fix Pack 1.
To use the same queue manager for both the broker and the JMS provider, ensure that your WebSphere MQ installation is at the minimum required level: WebSphere MQ Version 6.0 Fix Pack 1 or above is required for XA to use the same queue manager for both the broker and the provider.
sync point control for the JMS provider is managed with RRS sync point coordination of the queue manager of the broker. You do not need to modify the .ini file.
When you have put an instance of the JMSInput node into a message flow, you can configure it; see Configuring a message flow node. The properties of the node are displayed in the Properties view. To display the properties of the node in the Properties dialog, either double-click the node, or right-click the node and click Properties. All mandatory properties that do not have a default value defined are marked with an asterisk.
Terminal | Description |
---|---|
Failure | The output terminal to which the message is routed if an error occurs. Even if the Validation property is set, messages that are propagated to this terminal are not validated. |
Out | The output terminal to which the message is routed if it is retrieved successfully. |
Catch | The output terminal to which the message is routed if an exception is generated downstream and caught by this node. |
The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined); the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the BAR file to deploy it).
Property | M | C | Default | Description |
---|---|---|---|---|
Node name | No | No | The node type, JMSInput | The name of the node. |
Short description | No | No | A brief description of the node. | |
Long description | No | No | Text that describes the purpose of the node in the message flow. |
Property | M | C | Default | Description |
---|---|---|---|---|
Source queue | No | No | Selected | The name of the queue from which the node receives incoming messages. If the node is to read from a queue (point-to-point), select Source queue and enter the name of the source queue, which is the JMS queue that is listed in the bindings file. This property is mutually exclusive with Subscription topic. |
Subscription topic | No | No | Cleared | The name of the topic to which the node is subscribed. If the node is to read from a Subscription topic (publish/subscribe), select Subscription topic and enter the name of the subscription topic.
|
Durable subscription ID | No | No | The identifier for a durable subscription topic. If the node is to receive publications from a durable subscription topic, enter a Durable subscription ID.
|
Property | M | C | Default | Description |
---|---|---|---|---|
Initial context factory | Yes | Yes | com.sun.jndi.fscontext. RefFSContextFactory | The starting point for a JNDI name space.
Enter an Initial context factory value. A JMS application uses the initial context to obtain and look up the JNDI administered objects for the JMS provider. The default value is com.sun.jndi.fscontext.RefFSContextFactory, which defines the file-based Initial context factory for the WebSphere MQ JMS provider. To identify the name of the Initial context factory for the JMS provider, see the JMS provider documentation. |
Location JNDI bindings | Yes | Yes | The system path or the LDAP location for the bindings file. The bindings file contains definitions for the JNDI administered objects that are used by the JMSInput node. When you enter a value for Location JNDI bindings, ensure that it complies with the following instructions:
For information about constructing the JNDI administered objects bindings file, see the JMS provider documentation. |
|
Connection factory name | Yes | Yes | The name of the connection factory that is used by the JMSInput node to create a connection to the JMS provider. This name must already exist in the bindings file. | |
Backout destination | No | Yes | The JMSInput node sends input messages to this destination when errors prevent the message flow from processing the message, and the message must be removed from the input destination. The backout destination name must exist in the bindings file. | |
Backout threshold | No | Yes | 0 | The value that controls when a redelivered message is put to the backout destination. For example, if the value is 3, the JMS provider attempts to deliver the message to the input destination three times. After the third attempted delivery, the message is removed from the input destination and is sent to the Backout destination. |
Property | M | C | Default | Description |
---|---|---|---|---|
Message domain | No | No | The domain that is used to parse the incoming message.
If Message domain is left blank, the JMSInput node determines the message domain in one of two ways:
For more information, see Order of precedence for deriving the message domain.
|
|
Message set | No | No | The name or identifier of the message set in which the incoming message is defined. If you are using the MRM or IDOC parser, select the Message set that you want to use. This list is populated with available message sets when you select MRM or IDOC as the Message domain. Leave Message set blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers. |
|
Message type | No | No | The name of the incoming message. If you are using the MRM parser, select the message that you want from the list in Message type. This list is populated with messages that are defined in the Message set that you have selected. Leave Message type blank for XML, XMLNS, XMLNSC, JMS, MIME, BLOB, and IDOC parsers. |
|
Message format | No | No | The name of the physical format of the incoming message. If you are using the MRM or IDOC parser, select the format of the message from the list in Message format. This list includes all of the physical formats that you have defined for this Message set. Leave Message format blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers. |
Property | M | C | Default | Description |
---|---|---|---|---|
Parse timing | No | No | On Demand | This property controls when an input message is parsed. Valid values are:
By default, Parse timing is set to On Demand. This value causes validation to be delayed until the message is parsed by partial parsing.
|
Use XMLNSC compact parser for XMLNS domain | No | No | Cleared | This property controls whether the XMLNSC Compact Parser is used for messages in the XMLNS Domain. If you set this property, the message data appears under XMLNSC in nodes that are connected to the output terminal when the input MQRFH2 header or Input Message Parsing properties Message domain is XMLNS. |
Retain mixed content | No | No | Cleared | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters mixed text in an input message. If you select the check box, elements are created for mixed text. If you clear the check box, mixed text is ignored and no elements are created. |
Retain comments | No | No | Cleared | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters comments in an input message. If you select the check box, elements are created for comments. If you clear the check box, comments are ignored and no elements are created. |
Retain processing instructions | No | No | Cleared | This property controls whether the XMLNSC parser creates elements in the message tree when it encounters processing instructions in an input message. If you select the check box, elements are created for processing instructions. If you clear the check box, processing instructions are ignored and no elements are created. |
Property | M | C | Default | Description |
---|---|---|---|---|
Application property | No | Yes | The message selector that filters messages according to the application property value. If the JMS provider is required to filter messages, based on message properties that are set by the originating JMS client application, enter a value for Application property, specifying both the property name and the selection conditions; for example, OrderValue > 200. Leave Application property blank if you do not want the input node to make a selection based on application property. For a description of how to construct the JMS message selector, see JMS message selector. |
|
Timestamp | No | Yes | The message selector that filters messages according to the JMSTimestamp. If the JMS provider is required to filter messages that have been generated at specific times, enter a value for Timestamp, where the value is an unqualified Java millisecond time; for example, 105757642321. Qualify the selector with operators, such as BETWEEN or AND. Leave Timestamp blank if you do not want the input node to make a selection based on the JMSTimeStamp. |
|
Delivery mode | No | Yes | All | The message selector that filters messages according to the message delivery mode. If the JMS provider is required to filter messages based on the JMSDeliveryMode header value in the JMS messages, select an option for Delivery mode from the list:
|
Priority | No | Yes | The message selector that filters messages according to the message priority. If the JMS provider is required to filter messages based on the JMSPriority header value in the JMS message, enter a value for Priority. Valid values for Priority are from 0 (lowest) to 9 (highest); for example, enter 5 to receive messages of priority 5. You can also qualify the selector; for example, > 4 to receive messages with a priority greater than 4, or BETWEEN 4 AND 8 to receive messages with a priority in the range 4 to 8. Leave Priority blank if you do not want the input node to make a selection based on the JMSPriority. |
|
Message ID | No | Yes | The message selector that filters messages according to the message ID. If the JMS provider is required to filter messages based on the JMSMessageID header, enter a value for Message ID. Enter a specific Message ID or enter a conditional selector; for example, enter > WMBRK123456 to return messages where the Message ID is greater than WMBRK123456. Leave Message ID blank if you do not want the input node to make a selection based on JMSMessageID. |
|
Redelivered | No | Yes | If the JMS provider is required to filter messages based on the JMSRedelivered header, enter a value for Redelivered:
|
|
Correlation ID | No | Yes | The message selector that filters messages according to the correlation ID. If the JMS provider is required to filter messages based on the JMSCorrelationID header, enter a value for Correlation ID. Enter a specific Correlation ID or enter a conditional string; for example, WMBRKABCDEFG returns messages with a Correlation ID that matches this value. Leave Correlation ID blank if you do not want the input node to make a selection based on JMSCorrelationID. |
Property | M | C | Default | Description |
---|---|---|---|---|
Transaction mode | Yes | No | none | This property controls whether the incoming message is received under external sync point, local sync point, or out of sync point.
|
Property | M | C | Default | Description |
---|---|---|---|---|
Validate | No | Yes | None | This property controls whether validation takes place. Valid values are:
If you select Content or Content and Value, select an option from the Failure action list. |
Failure action | No | No | Exception | This property controls what happens if validation fails. You can set this property only if you set Validate to Content or Content and Value. Valid values are:
|
Include all value constraints | No | No | Selected | You cannot edit this property. Basic value constraint checks are included in Content and Value validation. |
Fix | No | No | None | You cannot edit this property. |