Skip to content

messaging/consumer

Documentation

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.

ts
static queue(destination: string): Queue;
ParameterTypeDescription
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.

ts
static topic(destination: string): Topic;
ParameterTypeDescription
destinationstringThe name of the topic destination (e.g., 'market.updates.topic').

Returns

  • Type: Topic
  • Description: A Topic instance.