uCosminexus Service Platform, Overview
The following figure shows sending and receiving of messages by Message Queue adapter:
Figure 2-59 Execution of sending and receiving of messages by Message Queue adapter
The message sending functionality of Message Queue adapter sets connection and sessions with JMS provider through the resource adapter according to the send message request from the business process. It also sends messages to JMS provider.
The message types you can send are XML format messages and binary format messages. However, even if the sent message is in XML format, it is stored as a binary format message in the sending queue.
You can specify the send option (JMS provider) while sending messages. The following table describes the list of send options of Message Queue adapter:
Table 2-13 List of send options of Message Queue adapter
Item | Overview of send option | Specification method | |
---|---|---|---|
Message | Definition | ||
Message sending destination (JMSDestination) |
Message sending queue. | Y | Y |
Message maintenance time (JMSExpiration) |
Message maintenance time. Message maintenance time refers to the time of continuous maintenance in the sending queue of JMS provider. | N | Y |
Message persistence (JMSDeliveryMode) |
Message persistence. Message persistence refers to specification of whether to maintain a message in the queue after a system fault or when JMS provider is restarted. | N | Y |
Message identification ID (JMSMessageID) |
ID to identify a message. Any information is set if WebSphere MQ Resource Adapter is used. |
- | - |
Time stamp (JMSTimestamp) |
Message time stamp. | - | - |
Report message sending destination (JMSReplyTo) |
Report message sending queue. | N | N |
Message type (JMSType) |
Message type. | N | Y |
Correlation identifier (JMSCorrelationID) |
Correlation identifier of message. | N | A |
Priority (JMSPriority) |
Message priority. 4 is set in WebSphere MQ Resource Adapter. | - | - |
For details on sending of messages by setting the message correlation identifier, see "2.10.2(2) Method of generating message correlation identifier".
The following figure gives an overview of the message sending functionality:
Figure 2-60 Message sending functionality
If Type2 is specified in the <id_type> tag of the communication configuration definition file of Message Queue adapter, Message Queue adapter automatically generates the message correlation identifier and provides it to the sent message.
Message correlation identifier is configured from the prefix and Message Queue adapter-specific information. There are 2 methods namely, when the generation method of message correlation identifier provides the prefix and when it does not provide a prefix.
Message Queue adapter-specific information is set by Message Queue adapter.
There is no prefix provided in the message correlation identifier when there is no specification in <JMSCorrelID_PFX> tag.
In such cases, the first 6 bytes have 0 (zero) padding and the message correlation identifier matches with the Message Queue adapter-specific information.
Figure 2-61 Method of generating message correlation identifier (without prefix)
If the message correlation identifier is provided with a prefix and if the <JMSCorrelID_PFX> tag is specified, the <JMSCorrelID_PFX> tag value is a part of the message correlation identifier. You can specify a maximum of 6 bytes for the prefix. However, if the prefix is less than 6 bytes, there is 0 (zero) padding from the beginning to make the prefix 6 bytes. For example, if the specified value of the <JMSCorrelID_PFX> tag is "ABC", "000ABC" is set in the prefix part.
This prefix and Message Queue adapter-specific information match to form the message correlation identifier.
Figure 2-62 Method of generating message correlation identifier (with prefix)
For the transaction support level provided in the resource adapter, specify "LocalTransaction" or "XATransaction". However, you can only specify "LocalTransaction" when business process status is not persistent. You cannot specify "NoTransaction".
If you specify "LocalTransaction" or "XATransaction", correlation occurs with JTA (Java Transaction API). For example, if the specified value of JTA transaction timeout is shorter than the message reception response monitoring time (receive_timeout) of the communication configuration definition file of Message Queue adapter, timeout occurs in the specified value of JTA transaction timeout.
If a request to receive messages or a request to send and receive messages is received from the business process, Message Queue adapter issues a request to receive messages. If the resource adapter cannot receive the message of this request to receive messages within the fixed time, timeout of the message reception response monitoring time occurs in the resource adapter. Message Queue adapter notifies the business process about fault response information according to the notification from the resource adapter. Moreover, a request to browse and receive a message is received from the business process and this request is made. However, even if the message does not exist in the reception queue, the business process is notified about fault response information.
For details on defining the process to be followed when a fault occurs, see "5.4.3 Defining Fault Handling" in "Service Platform Basic Development Guide" .
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.