This subsection describes the CJMSP Broker-based destination management and routing services.
CJMSP Broker creates and manages the queues and topics in the system memory as physical destinations.
The routing service is used to send and receive messages between the producers, consumers, and destinations reliably and smoothly while using the resources efficiently.
The destinations can be classified into the following two types based on the method of creation and period of existence:
The features of each destination are as follows:
Apart from the destinations used for the normal sending and receiving of messages, there is a destination called the dead message queue that is automatically created by CJMSP Broker.
The dead message queue is created when CJMSP Broker is first started. CJMSP Broker registers the following messages (dead messages) in this destination:
The messages that could not be processed at other destinations and are discarded are stored in the dead message queue; therefore, the messages can be used to check for problems occurring during the sending and receiving of messages.
For details on the management of the dead message queue, see (3) Managing the dead message queue.
With CJMSP Broker, you can execute the following processing to set up and manage the destinations:
You execute the above processing using commands. For details, see 5.3 Details of commands for managing CJMSP Broker in the uCosminexus Application Server Command Reference Guide.
The settings specify that the dead message queue always be used with all the destinations.
You specify the processing to be performed when a message is registered in the dead message queue, in the message properties for each message.
The following table describes the content that can be set in the message properties.
Table 7-3 Content that can be set in the message properties as the processing for registration in the dead message queue
Property | Data type | Explanation |
---|---|---|
CJMS_PRESERVE_UNDELIVERED# | Boolean | Specifies the processing to be performed when a message cannot be delivered.
|
CJMS_LOG_DEAD_MESSAGES# | Boolean | Specifies whether the information about the messages deleted from the destination and registered in the dead message queue will be output to the log.
|
CJMS_TRUNCATE_MSG_BODY# | Boolean | Specifies whether to delete the message body of the message registered in the dead message queue.
|
# This property is not supported with CJMS Provider.
Also, CJMSP Broker sets the properties for the dead messages registered in the dead message queue. Based on the specified property information, you can check the reason for the registration of the message in the dead message queue, and the processing that formed the contributing factor.
The following table describes the properties specified for the dead messages by CJMSP Broker.
Table 7-4 Properties specified for the dead messages by CJMSP Broker
Property | Data type | Explanation |
---|---|---|
JMSXDeliveryCount | Integer | Specifies the maximum number of messages delivered to a specific consumer. This value is only specified when ERROR or UNDELIVERABLE is set in the CJMS_DMQ_UNDELIVERED_REASON property. |
CJMS_DMQ_UNDELIVERED_TIMESTAMP | Long | Specifies the time registered in the dead message queue in milliseconds. |
CJMS_DMQ_UNDELIVERED_REASON | String | Specifies the value indicating the reason for registration in the dead message queue. The following values are set up:
|
CJMS_DMQ_PRODUCING_BROKER | String | Specifies the name and port number of CJMSP Broker that created this message. If null is specified, it indicates a locally operating CJMSP Broker. |
CJMS_DMQ_DEAD_BROKER | String | Specifies the name and port number of CJMSP Broker that manages the dead message queue. If null is specified, it indicates a locally operating CJMSP Broker. |
CJMS_DMQ_UNDELIVERED_EXCEPTION | String | Specifies the name of the exception occurring in the application or CJMSP Broker, for the messages that were not delivered because an exception occurred. |
CJMS_DMQ_UNDELIVERED_COMMENT | String | Specifies the additional reasons, if any, due to which the messages were not sent. |
CJMS_DMQ_BODY_TRUNCATED | Boolean | Specifies whether the message body was deleted during registration in the dead message queue. If true, the message body has been deleted. If false, the message body has not been deleted. |