Skip to content

Commit 03bfed4

Browse files
committed
producer conf type
1 parent 0b4385a commit 03bfed4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/producer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ClientMetrics, HighLevelProducer, Message as RdMessage, Metadata } from "node-rdkafka";
22
import { IProducer } from "./iProducer";
33
import { Message, MessageHeader, ProducerRecord } from "../types";
4+
import { ProducerGlobalConfig } from "node-rdkafka/config";
45

56
export class Producer implements IProducer {
67
private connected: boolean;
@@ -11,7 +12,7 @@ export class Producer implements IProducer {
1112
* @param config Node-rdkafka configuration object. Minimum: `{ "metadata.broker.list": "0.0.0.0:9094" }`
1213
* @param topicPrefix Prefix to add before each topic name
1314
*/
14-
constructor(config: any, topicPrefix?: string) {
15+
constructor(config: ProducerGlobalConfig, topicPrefix?: string) {
1516
this.connected = false;
1617
this.prefix = topicPrefix ? topicPrefix : "";
1718

0 commit comments

Comments
 (0)