Skip to content

Commit

Permalink
Expose maxWaitTimeInMs as an env var
Browse files Browse the repository at this point in the history
  • Loading branch information
roy-dydx committed Sep 5, 2024
1 parent 386f64d commit 1a940f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/indexer-build-and-push-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Indexer Build & Push Images to AWS ECR for Testnet Branch
on: # yamllint disable-line rule:truthy
push:
branches:
- roy/*
- main
- 'release/[a-z]+/v0.[0-9]+.x' # e.g. release/indexer/v0.1.x
- 'release/[a-z]+/v[0-9]+.x' # e.g. release/indexer/v1.x
Expand Down
1 change: 1 addition & 0 deletions indexer/packages/kafka/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const kafkaConfigSchema = {
KAFKA_MAX_BATCH_WEBSOCKET_MESSAGE_SIZE_BYTES: parseInteger({
default: 900000, // ~900 kB, 100 kB smaller than the 1 MB default max size of messages in Kafka
}),
KAFKA_WAIT_MAX_TIME_MS: parseInteger({ default: 5_000 }),
};

export default parseSchema(kafkaConfigSchema);
1 change: 1 addition & 0 deletions indexer/packages/kafka/src/consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const consumer: Consumer = kafka.consumer({
sessionTimeout: config.KAFKA_SESSION_TIMEOUT_MS,
rebalanceTimeout: config.KAFKA_REBALANCE_TIMEOUT_MS,
heartbeatInterval: config.KAFKA_HEARTBEAT_INTERVAL_MS,
maxWaitTimeInMs: config.KAFKA_WAIT_MAX_TIME_MS,
readUncommitted: false,
maxBytes: 4194304, // 4MB
});
Expand Down

0 comments on commit 1a940f3

Please sign in to comment.