Fake Mirrors
    Preparing search index...

    Interface ProducerConnector

    Defines the public contract for a producer connector.

    The connector is responsible for establishing and managing the lifecycle of the producer connection.

    interface ProducerConnector {
        close(): Promise<void>;
        getConnection<T>(): T;
    }

    Implemented by

    • Gracefully closes a connection to the producer.

      This method should be called during application shutdown to ensure all pending operations are completed and resources are released.

      Returns Promise<void>

      BootstrapError If the connection cannot be closed properly.

    • Retrieves the underlying producer connection.

      This method uses a type assertion to return the connection as the requested type. It is the caller's responsibility to ensure the correct type is used.

      Type Parameters

      • T

        The expected type of the producer connection.

      Returns T

      The producer connection cast to type T.