messaging/producer
Documentation
- source: messaging/producer.ts
Overview
Classes
Producer
queue()
Creates a Queue producer instance for point-to-point messaging. Messages sent to this destination are intended to be consumed by a single receiver.
tsstatic queue(destination: string): Queue;
Parameter Type Description destinationstringThe name of the queue destination (e.g., 'task.queue'). Returns
- Type:
Queue- Description: A Queue instance.
topic()
Creates a Topic producer instance for publish/subscribe messaging. Messages sent to this destination can be consumed by multiple subscribers simultaneously.
tsstatic topic(destination: string): Topic;
Parameter Type Description destinationstringThe name of the topic destination (e.g., 'sensor.data.topic'). Returns
- Type:
Topic- Description: A Topic instance.
