Skip to content

Commit

Permalink
Expose maxWaitTimeInMs and set subaccounts partitions to 3 (backport #…
Browse files Browse the repository at this point in the history
…2224) (#2225)

Co-authored-by: roy-dydx <[email protected]>
  • Loading branch information
mergify[bot] and roy-dydx authored Sep 6, 2024
1 parent 386f64d commit dd84321
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion indexer/services/bazooka/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const KAFKA_TOPICS_TO_PARTITIONS: { [key in KafkaTopics]: number } = {
[KafkaTopics.TO_ENDER]: 1,
[KafkaTopics.TO_VULCAN]: 60,
[KafkaTopics.TO_WEBSOCKETS_ORDERBOOKS]: 1,
[KafkaTopics.TO_WEBSOCKETS_SUBACCOUNTS]: 30,
[KafkaTopics.TO_WEBSOCKETS_SUBACCOUNTS]: 3,
[KafkaTopics.TO_WEBSOCKETS_TRADES]: 1,
[KafkaTopics.TO_WEBSOCKETS_MARKETS]: 1,
[KafkaTopics.TO_WEBSOCKETS_CANDLES]: 1,
Expand Down

0 comments on commit dd84321

Please sign in to comment.