tibemsMsg_Acknowledge

Function

Purpose

Acknowledge messages.

C Declaration

tibems_status tibemsMsg_Acknowledge(
    tibemsMsg message );

COBOL Call

CALL "tibemsMsg_Acknowledge"
     USING BY VALUE message,
           RETURNING tibems-status
END-CALL.
Note: message has usage pointer.

Parameters

Parameter Description
message Acknowledge this message (but for the actual behavior of this call, see the Remarks below).

Remarks

The behavior of this call depends on the acknowledgment mode of the tibemsSession.

  • In TIBEMS_CLIENT_ACKNOWLEDGE mode, this call acknowledges all messages that the program has consumed within the session. (This behavior complies with the JMS specification.)
  • In TIBEMS_EXPLICIT_CLIENT_ACKNOWLEDGE mode, this call acknowledges only the individual message. (This mode and behavior are proprietary extensions, specific to TIBCO EMS.)
  • In TIBEMS_EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE mode, this call lazily acknowledges only the individual message. Lazy means that the provider client library can delay transferring the acknowledgment to the server until a convenient time; meanwhile the server might redeliver the message. (This mode and behavior are proprietary extensions, specific to TIBCO EMS.)
  • In all other modes, this call has no effect. In particular, modes that specify transactions or implicit acknowledgment do not require the consuming program to call this function. However, calling it does not produce an exception. (This behavior complies with the JMS specification.)

Consumed

Two events mark a message as consumed—that is, eligible for acknowledgment using this function:

  • Just before the provider calls an tibemsMsgCallback function, it marks the message argument as consumed.
  • Just before a receive call returns a message, it marks that message as consumed.

Redelivery

The server might redeliver unacknowledged messages.

Restriction

It is illegal to call this function after closing the session, the connection or the consumer through which the message arrived.