Managing a session involves using threads appropriately for the type of session (synchronous or asynchronous) and managing message delivery for both transacted and nontransacted sessions. For more information about thread management, see Managing Threads.
For a session that is not transacted, use the MQRecoverSession() function to restart message delivery with the last unacknowledged message.
For a session that is transacted, use the MQRollBackSession() function to roll back any messages that were delivered within this transaction. Use the MQCommitSession() function to commit all messages associated with this transaction.
Use the MQCloseSession() function to close a session and all its associated producers and consumers. This function also frees memory allocated for the session.
You can get information about a session’s acknowledgment mode by calling the MQGetAcknowledgeMode() function.