Message handling
A PolicyCenter server reads integration messages from a queue and dispatches them to their destinations. However, there is no guarantee that messages in the queue are ready for dispatching in the same order in which PolicyCenter places the messages in the queue.
For example, suppose that a messaging server starts writing message 1 to the queue, and then starts writing message 2 to the same queue. It is possible that the server completes and commits message 2 while still writing message 1. This does not, in itself, present an issue. However, if the server attempts to read messages off the queue at this moment, then it skips the uncommitted message1 and reads message 2. You are most likely to encounter this situation in a clustered PolicyCenter environment.
To address this situation, PolicyCenter provides the IncrementalReaderSafetyMarginMillis parameter in file config.xml. This parameter determines how long after detecting a skipped message that PolicyCenter attempts to read messages again. This waiting period gives PolicyCenter a chance to commit the skipped message. If it is not possible to commit the message before the expiration of the waiting period:
- PolicyCenter assumes the message is lost and that it is not possible to commit the message.
- PolicyCenter skips the message permanently, thereafter.
For example, in the previous scenario, PolicyCenter waits 10 seconds (the default parameter value) before attempting to read messages again, beginning with the skipped message 1. If message 1 has still not been committed at that time, PolicyCenter skips it permanently.
Set the IncrementalReaderSafetyMarginMillis
parameter sufficiently long so that the server can commit the messages,
but without prematurely marking messages as permanently skipped. As the
server does not read any other messages during this waiting period, do
not set IncrementalReaderSafetyMarginMillis
so long as to delay the delivery of messages.
You can also set the following configuration parameters in config.xml to configure the messages reading environment:
IncrementalReaderPollIntervalMillisIncrementalReaderChunkSize
