🪳 Updated kafka broker uri to be dynamic

This commit is contained in:
2025-02-24 14:02:18 -05:00
parent fc857baa4b
commit c05d16a91a
2 changed files with 2 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ export default class AutoDownloadService extends Service {
async started() {
const kafka = new Kafka({
clientId: "comic-search-service",
brokers: ["localhost:9092"],
brokers: [process.env.KAFKA_BROKER_URI],
});
this.kafkaProducer = kafka.producer();
await this.kafkaProducer.connect();

View File

@@ -196,7 +196,7 @@ export default class ComicProcessorService extends Service {
async started() {
const kafka = new Kafka({
clientId: "comic-processor-service",
brokers: ["localhost:9092"],
brokers: [process.env.KAFKA_BROKER_URI],
logLevel: logLevel.INFO,
});
this.kafkaConsumer = kafka.consumer({ groupId: "comic-processor-group" });