Open topic with navigation

TIBCO Rendezvous® 8.8.0

# CMTransport

Constructor

## Visual Basic

    Overloads Public Sub New(
        ByVal netTransport As NetTransport,
        ByVal cmName As String,
        ByVal requestOld As Boolean,
        ByVal ledgerName As String,
        ByVal syncLedger As Boolean )
    Overloads Public Sub New(
        ByVal netTransport As NetTransport,
        ByVal cmName As String,
        ByVal requestOld As Boolean,
        ByVal ledgerName As String,
        ByVal syncLedger As Boolean )
    Overloads Public Sub New(
        ByVal netTransport As NetTransport,
        ByVal cmName As String,
        ByVal requestOld As Boolean )
    Overloads Public Sub New(
        ByVal netTransport As NetTransport )

## C#

    CMTransport(
        NetTransport netTransport,
        string cmName,
        bool requestOld,
        string ledgerName,
        bool syncLedger );
    CMTransport(
        NetTransport netTransport,
        string cmName,
        bool requestOld,
        string ledgerName,
        bool syncLedger );
    CMTransport(
        NetTransport netTransport,
        string cmName,
        bool requestOld );
    CMTransport(
        NetTransport netTransport );

## Purpose

Create a transport for certified delivery.

## Remarks

The new certified delivery transport must employ a valid transport for network communications.

The certified delivery transport remains valid until the program explicitly destroys it.

Parameter | Description
``transport`` | The new CMTransport employs this transport object for network communications. This object must be a NetTransport. Destroying the CMTransport does not affect this NetTransport object.
``cmName`` | Bind this reusable name to the new CMTransport, so the CMTransport represents a persistent correspondent with this name. If non-null, the name must conform to the syntax rules for Rendezvous subject names. It cannot begin with reserved tokens. It cannot be a non-reusable name generated by another call to the CMTransport constructor. It cannot be the empty string. If omitted or null, then the constructor generates a unique, non-reusable name for the duration of the transport. For more information, see Name.
``requestOld`` | This parameter indicates whether a persistent correspondent requires delivery of messages sent to a previous certified delivery transport with the same name, for which delivery was not confirmed. Its value affects the behavior of other CM sending transports. If this parameter is `true` and `cmName` is non-null, then the new CMTransport requires certified senders to retain unacknowledged messages sent to this persistent correspondent. When the new CMTransport begins listening to the appropriate subjects, the senders can complete delivery. (It is an error to supply `true` when `cmName` is null.) If this parameter is `false` (or omitted), then the new CMTransport does not require certified senders to retain unacknowledged messages. Certified senders may delete those messages from their ledgers.
``ledgerName`` | If this argument is non-null, then the new CMTransport uses a file-based ledger. The argument must represent a valid file name. Actual locations corresponding to relative file names conform to operating system conventions. We strongly discourage using the empty string as a ledger file name. If omitted or null, then the new CMTransport uses a process-based ledger. For more information, see Ledger File.
``syncLedger`` | If this argument is `true`, then operations that update the ledger file do not return until the changes are written to the storage medium. If this argument is `false` (or omitted), the operating system writes changes to the storage medium asynchronously.

## Name

If `cmName` is null, then CMTransport generates a unique, non-reusable name for the new certified delivery transport.

If `cmName` is non-null, then the new transport binds that name. A correspondent can persist beyond transport destruction only when it has both a reusable name and a file-based ledger.

For more information about the use of reusable names, see CM Correspondent Name in TIBCO Rendezvous Concepts, and Persistent Correspondents in TIBCO Rendezvous Concepts. For details of reusable name syntax, see Reusable Names in TIBCO Rendezvous Concepts.

## Ledger File

Every certified delivery transport stores the state of its certified communications in a ledger.

If `ledgerFile` is null, then the new transport stores its ledger exclusively in process-based storage. When you destroy the transport or the process terminates, all information in the ledger is lost.

If `ledgerFile` specifies a valid file name, then the new transport uses that file for ledger storage. If the transport is destroyed or the process terminates with incomplete certified communications, the ledger file records that state. When a new transport binds the same reusable name, it reads the ledger file and continues certified communications from the state stored in the file.

Even though a transport uses a ledger file, it may sometimes replicate parts of the ledger in process-based storage for efficiency; however, programmers cannot rely on this replication.

The `syncLedger` parameter determines whether writing to the ledger file is a synchronous operation:

| • | To specify synchronous writing, supply `true`. Each time Rendezvous software writes a ledger item, the call does not return until the data is safely stored in the storage medium.

| • | To specify asynchronous writing (the default), supply `false`. Certified delivery calls may return before the data is safely stored in the storage medium, which results in greater speed at the cost of certainty. The ledger file might not accurately reflect program state in cases of hardware or operating system kernel failure (but it is accurate in cases of sudden program failure). Despite this small risk, we strongly recommend this option for maximum performance.

A program that uses an asynchronous ledger file can explicitly synchronize it by calling CMTransport.SynchronizeLedgerNow.

Destroying a transport with a file-based ledger always leaves the ledger file intact; it neither erases nor removes a ledger file.

The ledger file must reside on the same host computer as the program that uses it.

## See Also

CMTransport.Destroy

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2025. Cloud Software Group, Inc. All Rights Reserved.