tibrvcmTransport_RemoveSendState()

Function

Declaration

tibrv_status tibrvcmTransport_RemoveSendState(
    tibrvcmTransport    cmTransport,
    const char*         subject);

Purpose

Reclaim ledger space from obsolete subjects.

Background

In some programs subject names are useful only for a limited time; after that time, they are never used again. For example, consider a server program that sends certified reply messages to client inbox names; it only sends one reply message to each inbox, and after delivery is confirmed and complete, that inbox name is obsolete. Nonetheless, a record for that inbox name remains in the server’s ledger.

As such obsolete records accumulate, the ledger size grows. To counteract this growth, programs can use this function to discard obsolete subject records from the ledger.

The DELIVERY.COMPLETE advisory is a good opportunity to clear the send state of an obsolete subject. Another strategy is to review the ledger periodically, sweeping to detect and remove all obsolete subjects.

Remarks

Warning 

Do not use this function to clear subjects that are still in use.

As a side-effect, this function resets the sequence numbering for the subject, so the next message sent on the subject would be number 1. In proper usage, this side-effect is never detected, since obsolete subjects are truly obsolete.

Parameter

Description

cmTransport

Remove send state from the ledger of this certified delivery transport.

subject

Remove send state for this obsolete subject.

See Also

tibrvcmTransport_ReviewLedger()

tibrvcmTransport_Send()

DELIVERY.COMPLETE in TIBCO Rendezvous Concepts