From fb8ce8ad6513095441db4bb0dc5e2f891f0a4a6c Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Fri, 11 Apr 2025 10:43:33 +0700 Subject: [PATCH] Allow auto topic creation in consumer (#8529) Signed-off-by: Andrey Sobolev --- server/kafka/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/kafka/src/index.ts b/server/kafka/src/index.ts index a0015f3c3c..04474ef5f0 100644 --- a/server/kafka/src/index.ts +++ b/server/kafka/src/index.ts @@ -204,7 +204,10 @@ class PlatformQueueConsumerImpl implements ConsumerHandle { fromBegining?: boolean } ) { - this.cc = this.kafka.consumer({ groupId: `${getKafkaTopicId(this.topic, this.config)}-${groupId}` }) + this.cc = this.kafka.consumer({ + groupId: `${getKafkaTopicId(this.topic, this.config)}-${groupId}`, + allowAutoTopicCreation: true + }) void this.start().catch((err) => { ctx.error('failed to consume', { err })