Monday, February 14, 2011

TIBCO Ledger file in Certified messaging : TIBCO Tutorial


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 in certified messaging
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

8 comments :

Anonymous said...

Hi, Is there any way to convert ledger files in the readable formats. As they are in encrypted format.

Javin @ Enum Examples in Java said...

@Anonymous, I am not sure but there must be a tool for viewing messages inside ledger file, try looking tibco documentation comes along with product installation. I will post if I come across or get some time to look into.

Anonymous said...

Hi Javin.. I tried going through all the documents i had related to tibco.. But couldn't find anything related to that.. There is something like tibco editor but it comes with the latest versions.. i have tibco rendezvous 7.4.1 version and tibco has stopped supporting this..

Anonymous said...

Thank you - this has helped me diagnose an issue were a second transport was attempting to overwrite the existing ledger (or rather, create a second ledger with the same name).

Anonymous said...

Hello Javin, Can you please suggest how to read tibco ledger file? I want to read contents of tibco file based ledge to see which messages are present there. I tried opening file in VI editor but it just shows binary data and some text in between, not very helpful. Does Tibco provides any tools to read ledger files?

Anonymous said...

I am also looking for similar tools. since information extracted from the ledger files can be useful in identifying slow and unresponsive certified messaging listeners. As slow and unresponsive listeners cause the ledger files to grow thereby consuming memory and disk space, its important to have some tools which can read tibco ledger files.

Anonymous said...

TIBCO IM has the option where u can browse and open a specific ledger file..it will show all info in tabular form like for how many messages u have recieved the acknowledge ment..how many messages are pending..CM listeners..etc. Besides using IM to view ledger file contents there is also an independent utility to view and analyze ledger file. You can find that utility (tib ledger editor) at power.tibco.com

Anonymous said...

Hello there, we are using Tibco certified message for order and trade delivery between different systems, but on publisher side we are seeing issue where ledger file is keep growing up, it seems CM messages are not getting deleted. we are using certified messaging with pre-registered listeners. There are two listeners and we are seeing confirmation coming up but still ledge rifle is growing.

Post a Comment