Skip to content

Commit

Permalink
chore(plugin-server): commitOffsetsForMessages -> storeOffsetsForMess…
Browse files Browse the repository at this point in the history
…ages
  • Loading branch information
bretthoerner committed Oct 3, 2023
1 parent 3d5b198 commit 5d2a74e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugin-server/src/kafka/batch-consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { exponentialBuckets, Gauge, Histogram } from 'prom-client'
import { status } from '../utils/status'
import { createAdminClient, ensureTopicExists } from './admin'
import {
commitOffsetsForMessages,
consumeMessages,
countPartitionsPerTopic,
createKafkaConsumer,
disconnectConsumer,
instrumentConsumerMetrics,
storeOffsetsForMessages,
} from './consumer'

export interface BatchConsumer {
Expand Down Expand Up @@ -210,7 +210,7 @@ export const startBatchConsumer = async ({
messagesProcessed += messages.length

if (autoCommit) {
commitOffsetsForMessages(messages, consumer)
storeOffsetsForMessages(messages, consumer)
}
}
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion plugin-server/src/kafka/consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const findOffsetsToCommit = (messages: TopicPartitionOffset[]): TopicPart
return highestOffsets
}

export const commitOffsetsForMessages = (messages: Message[], consumer: RdKafkaConsumer) => {
export const storeOffsetsForMessages = (messages: Message[], consumer: RdKafkaConsumer) => {
const topicPartitionOffsets = findOffsetsToCommit(messages).map((message) => {
return {
...message,
Expand Down

0 comments on commit 5d2a74e

Please sign in to comment.