Skip to content

Commit

Permalink
Change fromBeginning to a flag (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
dydxwill authored Jul 31, 2024
1 parent 757cd57 commit 56364db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions indexer/services/vulcan/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const configSchema = {
...redisConfigSchema,

BATCH_PROCESSING_ENABLED: parseBoolean({ default: true }),
PROCESS_FROM_BEGINNING: parseBoolean({ default: true }),
KAFKA_BATCH_PROCESSING_COMMIT_FREQUENCY_MS: parseNumber({
default: 3_000,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function connect(): Promise<void> {
// https://kafka.js.org/docs/consuming#a-name-from-beginning-a-frombeginning
// Need to set fromBeginning to true, so when vulcan restarts, it will consume all messages
// rather than ignoring the messages in queue that were produced before ender was started.
fromBeginning: true,
fromBeginning: config.PROCESS_FROM_BEGINNING,
});

if (config.BATCH_PROCESSING_ENABLED) {
Expand Down

0 comments on commit 56364db

Please sign in to comment.