Interface RPCProps

Hierarchy

  • RPCProps

Properties

confirm?: boolean

Enable publish-confirm mode. See confirmSelect

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

Any exchange-exchange bindings to be declared before the consumer and whenever the connection is reset.

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

Any exchanges to be declared before the consumer and whenever the connection is reset

maxAttempts?: number

Retries are disabled by default. Increase this number to retry when a request fails due to timeout or connection loss. The Connection options acquireTimeout, retryLow, and retryHigh will affect time between retries.

Default

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

Any queue-exchange bindings to be declared before the consumer and whenever the connection is reset.

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 queueDeclare

timeout?: number

Max time to wait for a response, in milliseconds. Must be > 0. Note that the acquireTimeout will also affect requests.

Default

30_000

Generated using TypeDoc