kafka-consumer-host
Version:
A NestJS Kafka consumer host module for scalable message consumption.
15 lines (14 loc) • 538 B
TypeScript
import { KafkaConfig, Mechanism, SASLOptions } from "kafkajs";
import { KafkaConsumerOffsetReset } from "../enums";
export interface KafkaConsumerConfig extends Omit<KafkaConfig, "ssl" | "sasl" | "brokers" | "clientId" | "offsetReset" | "topicsPartition"> {
bootstrapServer: string | string[];
groupId: string;
clientId?: string;
offsetReset?: KafkaConsumerOffsetReset;
topicsPartition?: {
topic: string;
partition: number;
}[];
ssl?: boolean;
sasl?: SASLOptions | Mechanism | undefined;
}