Skip to content

rabbitmq/consumer

Documentation

Overview

Classes

Consumer

startListening()

Starts listening for messages on a specified RabbitMQ queue. The handler is typically a service or script URI that will be executed when a message arrives.

ts
static startListening(queue: string, handler: string): void;
ParameterTypeDescription
queuestringThe name of the RabbitMQ queue to listen to.
handlerstringThe URI/name of the component/script that will handle the message.

Returns

  • Type: void
  • Description:

stopListening()

Stops the message listener previously started on a specified RabbitMQ queue for a given handler.

ts
static stopListening(queue: string, handler: string): void;
ParameterTypeDescription
queuestringThe name of the RabbitMQ queue.
handlerstringThe URI/name of the component/script whose listener should be stopped.

Returns

  • Type: void
  • Description: