This property determines, for messages being delivered to an asynchronous message listener, what happens to messages in the internal read ahead buffer when the message consumer is closed.
This property is applicable in specifying closing queue options when consuming messages from a destination and not applicable when sending messages to a destination.
This property will be ignored for Queue Browsers since during browse the messages will still be available in the queues.
The valid values for this property are:
By default this property is set to XMSC_WMQ _READ_AHEAD_CLOSE_POLICY_DELIVER_CURRENT.
All the messages in the read ahead buffer will be lost when a XMS application terminates abruptly.
The read ahead will be disabled when the applications use transaction. So, the application will not be seeing any difference in the behavior when they use transacted sessions.
The read ahead will be enabled when the on a non transacted session when the acknowledgement modes are either XMSC_AUTO_ACKNOWLEDGE or XMSC_DUPS_OK_ACKNOWLEDGE. The read ahead will be disabled if the session acknowledgement mode is XMSC_CLIENT_ACKNOWLEDGE irrespective of transacted or non transacted sessions.
The Queue Browsers and Queue Browser Selectors, used in XMS applications, will get the performance advantage from read ahead. Closing the Queue Browser won’t impact, since the message is still available in the queue for ay further operations. There will not be any other implication on queue browsers and queue browser selectors apart from performance benefits of read ahead.
Specifying destination properties XMSC_WMQ_READ_AHEAD_ALLOWED and XMSC_WMQ_READ_AHEAD_CLOSE_POLICY, when XMS application uses the WebSphere Message Broker V6 queue manager will not be able to use the specified values. These destination property values will be silently ignored and the applications continue to work without read ahead. There will not be any errors thrown when used with V6 queue managers.
Closing a consumer that has been created with XMSC_WMQ_READ_AHEAD_CLOSE_POLICY_DELIVER_ALL option after stopping the connection might result in loss of messages which have already been streamed.
Closing a connection without explicitly closing a consumer which has been created with XMSC_WMQ_READ_AHEAD_CLOSE_POLICY_DELIVER_ALL option might result in loss of messages which have already been streamed.
For further information about the Read Ahead, see WebSphere MQ Application Programming Guide book and WebSphere MQ Application Programming Reference book.