TIBCO Ledger files in certified messaging
This is in continuation to my previous article on TIBCO Certified messaging, in this TIBCO tutorial we will discuss about what is TIBCO ledger? What is process based ledger and what is file based ledger? Which messages are stored in TIBCO ledger? What are advantage and disadvantage of using TIBCO ledger? When should we use Process based and File based ledger etc. if you would like to read my earlier TIBCO Tutorial please see.
TIBCO ledger file is used in case of certified messaging to store unresolved message. When you use certified messaging using CMTransport then rendezvous process will store of each message in a ledger which could be either in Memory or File based.
You can either opt for In Memory or Process based ledger or File based ledger both approaches has there advantage and disadvantages which we will discuss in this tutorial. In case if you are going to use In Memory or process based ledger than all unconsumed messages will be lost if process shutdown or crashed. so it only make sense to opt for Process based ledger if certification is required only on process duration if you would like to have recording after process duration then file based ledger should be used.
TIBCO rendezvous Process keeps every outbound message in ledger either in Process memory or in persistent File based upon its configuration until it’s consumed by the entire certified subscriber or until specified expiry times got elapsed.
Advantage of File based ledger is that storage extends beyond process duration so message will be available even in case of process died which is
essential for recovery purposes but since you are using file there is always chance of file corruption also it makes failover of process complicated because ledger file needs to be accessed from secondary host to solve this problem generally ledger file is stored in NFS file system or SAN disk so that both primary and secondary process can access it.
Advantage of In Memory or Process based ledger is that it doesn't require file so no worry of file corruption but it will only be available during process duration , also if number of messages stored in ledger grows exponentially then there is chance of process ran out of memory and get crashed.
One important thing to note down is that ledger file must be exclusive to CM Transport i.e. same ledger file can not be shared between two different CM Transports.
CM Transport stores following message in ledger file
1) Every undelivered outbound certified messages until it gets consumed or time limit expires.
2) Every subject or topic for which this CM Transport receives (inbound) certified messages.
3) Some control messages.
Labeled messages are used during certified messaging. Labeled messages are nothing but normal rendezvous messages which some additional information required for certified messaging e.g.
1) Name of CM Transport which sends messages.
2) Sequence Number assigned by Sender CM Transport
3) Time limit after which sending CM Transport will delete this messages from ledger.
Another important thing to note is size of ledger both in case of In Memory ledger or File based ledger. Since ledger can grow exponentially based upon volume and time limit required to keep the messages in ledger in case of failed delivery. Its developer’s responsibility to ensure that sufficient memory in case of process based ledger and sufficient disk storage in case of File based ledger must be available to the process or CMTransport.
Location of ledger file is another important decision to make TIBCO recommends to keep the ledger file in local host where process runs and avoid putting it to Network mounted drive the reasoning behind this is since we use Certified messaging to tackle network failure or any network issues putting ledger file on network will be the same mistake and adds another sets of dependency to the process.
you might also like my other post of Difference between Rendezvous Daemon and Rendezvous Routing Daemon
if you like this tutorial please share it .
Some other Tutorial you may like