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

Acknowledge Modes

The Message Queue runtime supports reliable delivery by using transacted sessions or through acknowledgement options set at the session level. When you use the MQCreateSession function to create a session, you must specify an acknowledgement option for that session using the acknowledgeMode parameter. The value of this parameter is ignored for transacted sessions.

Table 4–3describes the effect of the options you can set using the acknowledgeMode parameter.

Table 4–3 acknowledgeMode Values




The session automatically acknowledges each message consumed by the client. This happens when one of the receive functions returns successfully, or when the message listener processing the message returns successfully. 


The client explicitly acknowledges all messages for the session that have been consumed up to the point when the MQAcknowledgeMessages function has been called. See the discussion of the function MQAcknowledgeMessages for additional information.


The session acknowledges after ten messages have been consumed and does not guarantee that messages are delivered and consumed only once. 


This value is read only. It is set by the library if you have passed MQ_TRUE for the isTransacted parameter to the MQCreateSession function. It is returned to you by the MQGetAcknowledgeMode function if the session is transacted.