haredo

    Interface ExchangeInterface<T>

    interface ExchangeInterface<T = unknown> {
        args: ExchangeArguments;
        name: string;
        params: ExchangeParams;
        type: ExchangeType;
        alternateExchange(alternate: string | ExchangeInterface<unknown>): this;
        autoDelete(autoDelete?: boolean): this;
        delayed(): this;
        durable(durable?: boolean): this;
        passive(passive?: boolean): this;
    }

    Type Parameters

    • T = unknown
    Index

    Properties

    name: string
    params: ExchangeParams

    Methods

    • Set the alternate exchange for this exchange. If a message cannot be routed to any queue in this exchange, it will be sent to the alternate exchange.

      Parameters

      Returns this

    • Set the exchange as autoDelete. AutoDelete exchanges will be deleted when there are no queues bound to it.

      Parameters

      • OptionalautoDelete: boolean

      Returns this

    • Set the exchange as durable. Durable exchanges will survive broker restarts.

      Parameters

      • Optionaldurable: boolean

      Returns this

    • Set the exchange as passive. Passive exchanges will not be created by the broker.

      Parameters

      • Optionalpassive: boolean

      Returns this

    MMNEPVFCICPMFPCPTTAAATR