Skip to content

Commit

Permalink
Merge pull request #17 from sweet-security/0.0.5
Browse files Browse the repository at this point in the history
producer conf type
  • Loading branch information
TsurEdoe authored Sep 11, 2024
2 parents c61bc59 + 03bfed4 commit e47678c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/producer.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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 : "";

Expand Down

0 comments on commit e47678c

Please sign in to comment.