rabbitmq/consumer
Documentation
- source: rabbitmq/consumer.ts
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.
tsstatic startListening(queue: string, handler: string): void;
Parameter Type Description 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.
tsstatic stopListening(queue: string, handler: string): void;
Parameter Type Description queuestringThe name of the RabbitMQ queue. handlerstringThe URI/name of the component/script whose listener should be stopped. Returns
- Type:
void- Description:
