WebSphere Message Service Client for C/C++, Version 2.0.2 Operating Systems: AIX, Linux, Solaris, Windows

XMSC_WMQ_READ_AHEAD_CLOSE_POLICY

Data type:
xmsINT
Property of:
Destination

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:

XMSC_WMQ_READ_AHEAD_CLOSE_POLICY_DELIVER_CURRENT
Only the current message listener invocation completes before returning, potentially leaving messages in the internal read ahead buffer, which are then discarded.
XMSC_WMQ_READ_AHEAD_CLOSE_POLICY_DELIVER_ALL
All messages in the internal read ahead buffer are delivered to the application’s message listener before returning. Please see Notes below.

By default this property is set to XMSC_WMQ _READ_AHEAD_CLOSE_POLICY_DELIVER_CURRENT.

Notes:
  • Abnormal application termination

    All the messages in the read ahead buffer will be lost when a XMS application terminates abruptly.

  • Implications on Transactions

    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.

  • Implications of Session Acknowledgement modes

    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.

  • Implications on Queue Browsers and Queue Browser Selectors

    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.

  • Implications of read ahead destination properties on WebSphere Message Broker v6 or earlier queue managers

    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.

  • Consumer close

    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.

  • Connection close

    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.


Reference topic

Terms of Use | Rate this page

Last updated: 24 May 2011

(C) Copyright IBM Corporation 2005, 2011. All Rights Reserved.