Skip to content

kafka/consumer

Documentation

Overview

Classes

Consumer

topic()

Creates a new topic configuration wrapper that can be used to start or stop listening for messages on a Kafka topic.

ts
static topic(destination: string, configuration: any): Topic;
ParameterTypeDescription
destinationstringThe name of the Kafka topic to consume messages from.
configurationanyOptional key-value object containing Kafka consumer properties

(e.g., 'group.id', 'auto.offset.reset'). |

Returns

  • Type: Topic
  • Description: A Topic instance configured for the specified destination and properties.