Options
All
  • Public
  • Public/Protected
  • All
Menu

RabbitMQ result backend using RPC and one queue per client.

Hierarchy

  • RpcBackend

Implements

Index

Constructors

Methods

Constructors

constructor

  • Constructs an RpcBackend with the given routing key and options. Queues up connection, creation, queue assertion, and consumer handling.

    Parameters

    • routingKey: string

      The name of the queue to consume from.

    • Optional options: AmqpOptions

      Connection options for the RabbitMQ connections. If undefined, will connect to localhost:6379.

    Returns RpcBackend

Methods

delete

  • delete(taskId: string): Promise<string>
  • Parameters

    • taskId: string

      The UUID of the task whose result is to be deleted.

    Returns Promise<string>

    "deleted" | "no result found".

disconnect

  • disconnect(): Promise<void>
  • Gently closes all channels and the connection with RabbitMQ. Alias for #end.

    see

    #end

    Returns Promise<void>

    A Promise that resolves when the disconnection is complete.

end

  • end(): Promise<void>
  • Gently closes all channels and the connection with RabbitMQ.

    Returns Promise<void>

    A Promise that resolves when the disconnection is complete.

get

  • Uses Utility.createTimeoutPromise.

    Type parameters

    • T

    Parameters

    • __namedParameters: object

    Returns Promise<ResultMessage<T>>

    The result as fetched from RabbitMQ.

put

uri

  • uri(): never
  • TODO: Actually return the connected RabbitMQ node's URI.

    throws

    UnimplementedError Always.

    Returns never

    Nothing.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc