Interface PublisherProps

Hierarchy

  • PublisherProps

Properties

confirm?: boolean

Enable publish-confirm mode. See confirmSelect

exchangeBindings?: {
    arguments?: Record<string, any>;
    destination: string;
    routingKey?: string;
    source: string;
}[]

Define any exchange-exchange bindings to be declared before the first publish and whenever the connection is reset. Same as Channel#exchangeBind()

exchanges?: {
    arguments?: {
        alternate-exchange?: string;
        [k: string]: any;
    };
    autoDelete?: boolean;
    durable?: boolean;
    exchange: string;
    internal?: boolean;
    passive?: boolean;
    type?: string;
}[]

Define any exchanges to be declared before the first publish and whenever the connection is reset. Same as Channel#exchangeDeclare()

maxAttempts?: number

Maximum publish attempts. Retries are disabled by default. Increase this number to retry when a publish fails. The Connection options acquireTimeout, retryLow, and retryHigh will affect time between retries. Each failed attempt will also emit a "retry" event.

Default

1
onReturn?: ((msg) => void)

Type declaration

queueBindings?: {
    arguments?: Record<string, any>;
    exchange: string;
    queue?: string;
    routingKey?: string;
}[]

Define any queue-exchange bindings to be declared before the first publish and whenever the connection is reset. Same as Channel#queueBind()

queues?: {
    arguments?: {
        x-dead-letter-exchange?: string;
        x-dead-letter-routing-key?: string;
        x-expires?: number;
        x-max-length?: number;
        x-max-priority?: number;
        x-message-ttl?: number;
        x-overflow?: "drop-head" | "reject-publish" | "reject-publish-dlx";
        x-queue-type?: "quorum" | "classic" | "stream";
        [k: string]: any;
    };
    autoDelete?: boolean;
    durable?: boolean;
    exclusive?: boolean;
    passive?: boolean;
    queue?: string;
}[]

Define any queues to be declared before the first publish and whenever the connection is reset. Same as Channel#queueDeclare()

Generated using TypeDoc