Interface Haredo

Hierarchy

  • InitialChain<unknown, unknown>
    • Haredo

Methods

  • Cancel all consumers, wait for them to finish processing their messages and then close the connection to the broker

    Returns Promise<void>

  • Connect to RabbitMQ. Note: this is not needed, Haredo connects automatically

    Returns Promise<void>

  • Create an exchange based chain

    Type Parameters

    • TCustomMessage = unknown

    • TCustomReply = unknown

    Parameters

    • exchange: Exchange<TCustomMessage>

      instance of Exchange

    Returns ExchangeChain<TCustomMessage, TCustomReply>

  • Add an exchange to the chain.

    Type Parameters

    • TCustomMessage = unknown

    • TCustomReply = unknown

    Parameters

    • exchange: string

      name of the exchange

    • type: "direct" | "headers" | "topic" | "fanout" | "x-delayed-message"

      exchange type, defaults to Direct

    • Optional opts: Partial<ExchangeOptions>

      exchange options that will be passed to amqplib while asserting amqplib#assertExchange

    Returns ExchangeChain<TCustomMessage, TCustomReply>

  • Create a queue based chain

    Type Parameters

    • TCustomMessage = unknown

    • TCustomReply = unknown

    Parameters

    • queue: Queue<TCustomMessage, TCustomReply>

    Returns QueueChain<TCustomMessage, TCustomReply>

  • Create a queue based chain

    Type Parameters

    • TCustomMessage = unknown

    • TCustomReply = unknown

    Parameters

    • queue: string

      name of the queue

    • Optional opts: AssertQueue

      optional parameters to pass to amqplib#AssertQueue

    Returns QueueChain<TCustomMessage, TCustomReply>

Generated using TypeDoc