Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kafka): add client consumer config for rebalancing timeout #6095

Merged
merged 1 commit into from
May 24, 2023

Conversation

overbit
Copy link
Contributor

@overbit overbit commented May 24, 2023

Close: #6062

PR Details

🤖 Generated by Copilot at 938f2c0

Summary

🆕🕑🔄

Added a new rebalanceTimeout option to the NestJS Kafka module configuration, based on the consumer session timeout from the KafkaEnv class. This option controls how long a consumer group waits for members to join in a rebalance.

KafkaEnv knows
consumer rebalance timeout
twice the session time

Walkthrough

  • Add rebalanceTimeout property to KafkaConfig interface to configure the maximum time for consumer group rebalancing (link)
  • Implement getConsumerRebalanceTimeout method in KafkaEnv class to return twice the consumer session timeout (link)
  • Use getConsumerRebalanceTimeout method to set the rebalanceTimeout property in createNestjsKafkaConfig function, which creates the options for the NestJS Kafka module in libs/util/nestjs/kafka/src/createNestjsKafkaConfig.ts (link, link)

PR Checklist

  • Tests for the changes have been added
  • npm test doesn't throw any error

IMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing guidelines.

@overbit overbit requested a review from abrl91 May 24, 2023 09:52
@nx-cloud
Copy link

nx-cloud bot commented May 24, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 938f2c0. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 5 targets

Sent with 💌 from NxCloud.

@overbit overbit merged commit 2883ce4 into master May 24, 2023
9 checks passed
@overbit overbit deleted the feat/add-rebalancingtimeout branch May 24, 2023 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants