Skip to content

Commit 42132bd

Browse files
committed
topic name
1 parent 832f862 commit 42132bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/service-utils/src/node/usageV2.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { type UsageV2Event, getTopicName } from "../core/usageV2.js";
2020
export class UsageV2Producer {
2121
private kafka: Kafka;
2222
private producer: Producer | null = null;
23-
private productName: ServiceName;
23+
private topic: string;
2424

2525
constructor(config: {
2626
/**
@@ -57,7 +57,7 @@ export class UsageV2Producer {
5757
},
5858
});
5959

60-
this.productName = config.productName;
60+
this.topic = getTopicName(config.productName);
6161
}
6262

6363
/**
@@ -99,7 +99,7 @@ export class UsageV2Producer {
9999
});
100100

101101
await this.producer.send({
102-
topic: getTopicName(this.productName),
102+
topic: this.topic,
103103
messages: parsedEvents.map((event) => ({
104104
value: JSON.stringify(event),
105105
})),

0 commit comments

Comments
 (0)