fix(mpc-service): increase Kafka consumer session timeout

- Increase sessionTimeout from 30s to 5 minutes
- Increase heartbeatInterval from 3s to 10s
- Add rebalanceTimeout of 5 minutes
- This prevents consumer from being kicked out during long MPC keygen operations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-07 03:58:40 -08:00
parent 493a76117a
commit ab8852907d
1 changed files with 4 additions and 2 deletions

View File

@ -66,8 +66,10 @@ export class EventConsumerService implements OnModuleInit, OnModuleDestroy {
this.consumer = this.kafka.consumer({
groupId,
sessionTimeout: 30000,
heartbeatInterval: 3000,
sessionTimeout: 300000, // 5 minutes - MPC keygen can take a while
heartbeatInterval: 10000, // 10 seconds
maxWaitTimeInMs: 5000,
rebalanceTimeout: 300000, // 5 minutes
});
try {