Skip to content

Commit 00b3aa0

Browse files
committed
fix: offset subscription for ACS during startup
1 parent f4555b9 commit 00b3aa0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/worker.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,10 @@ export class Worker {
305305
const topicCfg = kafkaConfig.topics[topicLabel];
306306
const topic = await events.topic(topicCfg.topic);
307307
const offSetValue = await this.offsetStore.getOffset(topicCfg.topic);
308+
logger.info('subscribing to topic with offset value', topicCfg.topic, offSetValue);
308309
if (topicCfg.events) {
309310
for (let eventName of topicCfg.events) {
310-
await topic.on(eventName, eventListener);
311+
await topic.on(eventName, eventListener, { startingOffset: offSetValue });
311312
}
312313
}
313314
}

0 commit comments

Comments
 (0)