Sun Java System Message Queue 4.3 Developer's Guide for C Clients

MQRecoverSession

The MQCRecoverSession function stops message delivery and restarts message delivery with the oldest unacknowledged message.


MQRecoverSession(const MQSessionHandle sessionHandle);

Return Value

MQStatus. See the MQStatusIsError() function for more information.

Parameters

sessionHandle

The handle to the session that you want to recover.

You can only call this function for sessions that are not transacted. To rollback message delivery for a transacted session, use the MQRollBackSession() function. This function may be most useful if you use the MQ_CLIENT_ACKNOWELDGE mode.

All consumers deliver messages in a serial order. Acknowledging a received message automatically acknowledges all messages that have been delivered to the client.

Restarting a session causes it to take the following actions:

Common Errors

MQ_TRANSACTED_SESSION
MQ_CONCURRENT_ACCESS
MQ_SESSION_CLOSED
MQ_BROKER_CONNECTION_CLOSED