Set queued publish/subscribe message attributes
You control the behavior of some publish/subscribe message attributes using queue manager attributes. The other attributes you control in the Broker stanza of the qm.ini file.
We can set the following publish/subscribe attributes: for details see, Queue manager
parameters
Description | MQSC parameter name |
---|---|
Command message retry count | PSRTYCNT |
Discard undeliverable command input message | PSNPMSG |
Behavior following undeliverable command response message | PSNPRES |
Process command messages under syncpoint | PSSYNCPT |
- PersistentPublishRetry=yes | force
If you specify Yes, then if a publication of a persistent message through the queued publish/subscribe interface fails, and no negative reply was requested, the publish operation is retried.
If you requested a negative response message, the negative response is sent and no further retry occurs.
If you specify Force, then if a publication of a persistent message through the queued publish/subscribe interface fails, the publish operation is retried until the it is successfully processed. No negative response is sent.
- NonPersistentPublishRetry=yes | force
If you specify Yes, then if a publication of a non-persistent message through the queued publish/subscribe interface fails, and no negative reply was requested, the publish operation is retried.
If you requested a negative response message, the negative response is sent and no further retry occurs.
If you specified Force, then if a publication of a non-persistent message through the queued publish/subscribe interface fails, the publish operation is retried until it is successfully processed. No negative response is sent.
Note: To enable this functionality for non-persistent messages, then as well as setting the NonPersistentPublishRetry value we must also ensure that the queue manager attribute PSSYNCPT is set to Yes.Doing this might also have an impact on the performance of processing non-persistent publications as the MQGET from the STREAM queue now occurs under syncpoint.
- PublishBatchSize=number
The broker normally processes publish messages within syncpoint. It can be inefficient to commit each publication individually, and in some circumstances the broker can process multiple publish messages in a single unit of work. This parameter specifies the maximum number of publish messages that can be processed in a single unit of work
The default value for PublishBatchSize is 5.
- PublishBatchInterval=number
The broker normally processes publish messages within syncpoint. It can be inefficient to commit each publication individually, and in some circumstances the broker can process multiple publish messages in a single unit of work. This parameter specifies the maximum time (in milliseconds) between the first message in a batch and any subsequent publication included in the same batch.
A batch interval of 0 indicates that up to PublishBatchSize messages can be processed, provided that the messages are available immediately.
The default value for PublishBatchInterval is zero.