haredo

    Interface QueuePublishChain<T>

    interface QueuePublishChain<T> {
        confirm(): QueuePublishChain<T>;
        delete(options?: QueueDeleteOptions): Promise<void>;
        expiration(milliseconds: number): QueuePublishChain<T>;
        json(autoSerialize?: boolean): this;
        priority(priority: number): QueuePublishChain<T>;
        publish(message: T): Promise<void>;
        purge(): Promise<void>;
        setHeader(key: string, value: string | number): QueuePublishChain<T>;
        setPublishArgument<K extends keyof AMQPProperties>(
            key: K,
            value: AMQPProperties[K],
        ): QueuePublishChain<T>;
        setup(): Promise<void>;
        skipSetup(options?: boolean | SkipSetupOptions): this;
        type(type: string): QueuePublishChain<T>;
        unbindExchange(
            name: string,
            routingKey: string | string[],
            bindingArguments?: BindingArguments,
        ): Promise<void>;
        unbindExchange(
            name: ExchangeInterface,
            routingKey: string | string[],
            bindingArguments?: BindingArguments,
        ): Promise<void>;
    }

    Type Parameters

    • T

    Hierarchy (View Summary, Expand)

    Index

    Methods

    • Always serialize messages as JSON. This will make the publish method always serialize the message as JSON before sending it to the broker. The subscribe method will always deserialize the message as JSON before passing it to the callback.

      Parameters

      • OptionalautoSerialize: boolean

      Returns this

    • Send a message to the queue. Unless .json(false) has been called the message will be serialized as JSON before being sent to the broker.

      Parameters

      • message: T

      Returns Promise<void>

    MMNEPVFCICPMFPCPTTAAATR