messaging/consumer
Documentation
- source: messaging/consumer.ts
Overview
Classes
Consumer
queue()
Creates a Queue consumer instance for point-to-point messaging. Messages sent to this destination are consumed by only one receiver.
tsstatic queue(destination: string): Queue;
Parameter Type Description destinationstringThe name of the queue destination (e.g., 'orders.queue'). Returns
- Type:
Queue- Description: A Queue instance.
topic()
Creates a Topic consumer instance for publish/subscribe messaging. Messages sent to this destination can be consumed by multiple subscribers.
tsstatic topic(destination: string): Topic;
Parameter Type Description destinationstringThe name of the topic destination (e.g., 'market.updates.topic'). Returns
- Type:
Topic- Description: A Topic instance.
