Use the JMSOutput node to send messages to JMS destinations.
This topic contains the following sections:
The JMSOutput node acts as a JMS message producer, and can publish all six message types that are defined in the Java Message Service Specification, version 1.1. Messages are published by using method calls, which are described in the JMS specification.
The JMSOutput node is contained in the JMS drawer of the palette, and is represented in the workbench by the following icon:
Message flows that handle messages that are received from connections to JMS providers must always start with a JMSInput node. If you include the JMSOutput node in a message flow, you do not need to include a JMSInput node; but if you do not include a JMSInput node, you must include the MQJMSTransform node to transform the message to the format that is expected by the JMSOutput node.
If you are propagating JMS messages and creating a message flow to use as a subflow, use an instance of the JMSOutput node as the last node to create an out terminal for the subflow.
SET OutputRoot.JMSTransport.Transport_Folders.Message_MetaData.PayloadType=Payload value
For more information about the JMS message tree and payload values, see Representation of messages across the JMS Transport.
Configurable services are defined for a number of JMSProviders. 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.
The sender of a message might want the recipient to reply to the message. In this case, the JMSOutput message can treat the outgoing message as a reply, and route it according to the value that is obtained from the JMSReplyTo property from the request message. You can modify the value of the JMSReplyTo property in the MbMessage; for example, using a Compute node or a JavaCompute node. This action allows dynamic routing of messages from the JMSOutput node. The node sends the message to the JMS Destination name that is set in the JMSReplyTo field of the MbMessage Tree.
queue://QM_mn2/myJMSQueue4In this case, the value is the JMS-provider specific representation of a JMS Destination for the WebSphere MQ JMS provider.
jndi:\\jmsQ4where jmsQ4 is the name of the JNDI-administered object.
Performance might be slightly impacted when you use this method because of the need to look up the administered object in JNDI.
To allow the JMSOutput node to set the JMSReplyTo property dynamically in the outgoing message, leave the Reply To Destination field blank on the Basic tab, and set the JMSReplyTo value in the MbMessage using a Compute node or a JavaCompute node.
The node resolves the name of the JNDI-administered object that is supplied in either Publication Topic or Destination Queue, and sends the message to that JMS Destination.
When you include a JMSOutput node in a message flow, the value that you set for Transaction Mode defines whether messages are sent under syncpoint.
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.
Syncpoint control for the JMS provider is managed with RRS syncpoint coordination of the queue manager of the broker. You do not need to modify the .ini file.
Connect the In terminal of the JMSOutput node to the node from which outbound messages are routed.
Connect the Out terminal of the JMSOutput node to another node in the message flow to process the message further, to process errors, or to send the message to an additional destination.
When you have put an instance of the JMSOutput 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 |
---|---|
In | The input terminal that accepts a message for processing by the node. |
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 successfully retrieved from the WebSphere MQ queue. |
Catch | The output terminal to which the message is routed if an exception is thrown 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, JMSOutput | 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 |
---|---|---|---|---|
Initial Context Factory | Yes | Yes | com.sun.jndi.fscontext. RefFSContextFactory | This property is the starting point for a JNDI name space. A JMS application uses the initial context to obtain and look up the connection factory and queue or topic objects for the JMS provider. 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 | No | 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 JMSOutput 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 documentation that is supplied with the JMS provider. |
|
Connection Factory Name | No | Yes | The name of the connection factory that is used by the JMSOutput node to create a connection to the JMS provider. This name must already exist in the bindings file. |
Property | M | C | Default | Description |
---|---|---|---|---|
New Correlation ID | No | Yes | If the JMSOutput node is required to generate a new Correlation ID for the message, select New Correlation ID. If you leave the check box cleared, the Correlation ID of the output message is taken from the JMSCorrelationID field in the JMSTransport_Header_Values section of the message tree. | |
Transaction Mode | Yes | No | None | This property controls whether the incoming message is received under syncpoint.
|
Delivery Mode | No | Yes | Non Persistent | This property controls the persistence mode that a JMS provider uses for a message. Valid values are:
|
Message Expiration (ms) | No | Yes | 0 | This property controls the length of time, in milliseconds, for which the JMS provider keeps the output JMS message. The default value, 0, is used to indicate that the message must not expire. |
Message Priority | No | Yes | 4 | This property assigns relative importance to the message and it can be used for message selection by a receiving JMS client application or a JMSOutput node. Valid values for message priority are from 0 (lowest priority) to 9 (highest priority). The default value is 4, which indicates medium priority. Priorities in the range 0 to 4 relate to typical delivery. Priorities in the range 5 to 9 relate to graduations of expedited delivery. |