Skip to content

Conversation

@suuuuuuminnnnnn
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe: Tests + inline JSDoc clarification (no runtime behavior change)

What is the current behavior?

Issue Number: #14590

ServerKafka forwards options.run to KafkaJS consumer.run(), but there is no explicit test coverage proving that options.run.* is passed through without being dropped/filtered. Also, partitionsConsumedConcurrently is easy to misunderstand as topic-level concurrency although it is partition-level in KafkaJS.

What is the new behavior?

Adds test coverage to verify options.run.* is passed to KafkaJS consumer.run() and includes eachMessage handler, plus adds a short JSDoc note clarifying that partitionsConsumedConcurrently controls partition-level concurrency (KafkaJS parameter), not topic-level.

Summary

  • Add 2 test cases in packages/microservices/test/server/server-kafka.spec.ts to verify:
    • partitionsConsumedConcurrently is forwarded to consumer.run()
    • other options.run fields (e.g. autoCommit, autoCommitInterval) are forwarded as well
  • Add a minimal JSDoc note for KafkaOptions.run in packages/microservices/interfaces/microservice-configuration.interface.ts

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Test Plan

npm test
npm run lint
npm run build

Notes

@coveralls
Copy link

Pull Request Test Coverage Report for Build f8e216a8-32aa-4a8e-8551-9d263a0a5a30

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 16 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.004%) to 89.825%

Files with Coverage Reduction New Missed Lines %
packages/microservices/server/server-mqtt.ts 16 83.04%
Totals Coverage Status
Change from base Build ca6d79fa-981b-434b-bf99-139c0823428a: -0.004%
Covered Lines: 7460
Relevant Lines: 8305

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec merged commit 9f55de6 into nestjs:master Feb 9, 2026
4 checks passed
@kamilmysliwiec
Copy link
Member

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants