From 03bfed40a3abc234280480927fedfeee41b27697 Mon Sep 17 00:00:00 2001 From: Edoe Tsur Date: Wed, 11 Sep 2024 16:44:02 +0300 Subject: [PATCH] producer conf type --- src/lib/producer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/producer.ts b/src/lib/producer.ts index 68b4e89..83d4bac 100644 --- a/src/lib/producer.ts +++ b/src/lib/producer.ts @@ -1,6 +1,7 @@ import { ClientMetrics, HighLevelProducer, Message as RdMessage, Metadata } from "node-rdkafka"; import { IProducer } from "./iProducer"; import { Message, MessageHeader, ProducerRecord } from "../types"; +import { ProducerGlobalConfig } from "node-rdkafka/config"; export class Producer implements IProducer { private connected: boolean; @@ -11,7 +12,7 @@ export class Producer implements IProducer { * @param config Node-rdkafka configuration object. Minimum: `{ "metadata.broker.list": "0.0.0.0:9094" }` * @param topicPrefix Prefix to add before each topic name */ - constructor(config: any, topicPrefix?: string) { + constructor(config: ProducerGlobalConfig, topicPrefix?: string) { this.connected = false; this.prefix = topicPrefix ? topicPrefix : "";