Fake Mirrors
    Preparing search index...

    Class RedisProducerConnector

    Redis-based producer connector implementation.

    Uses the ioredis client to manage connections for the Bull queue producer.

    https://github.com/redis/ioredis - ioredis documentation

    Implements

    • 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>

      LifecycleError If the connection cannot be closed properly.

    • Establishes a connection to the producer.

      This method should be called during application bootstrap to ensure the connection is ready before any operations are performed.

      Returns Promise<void>

      LifecycleError If the producer connection cannot be established.

    • 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.

    • Registers the connector as a singleton in the DI container.

      Parameters

      • container: DIContainer

        The DI container to register in.

      Returns void