Skip to content

GH-4326: Verify share.acquire.mode works through Spring's config model#4393

Merged
sobychacko merged 1 commit into
spring-projects:mainfrom
maxwell-balla:GH-4326
Apr 14, 2026
Merged

GH-4326: Verify share.acquire.mode works through Spring's config model#4393
sobychacko merged 1 commit into
spring-projects:mainfrom
maxwell-balla:GH-4326

Conversation

@maxwell-balla

Copy link
Copy Markdown
Contributor

Verify that the share.acquire.mode property passes through Spring's config model correctly.

The property is a pass-through consumer configuration that requires no changes to ContainerProperties or ShareKafkaMessageListenerContainer. DefaultShareConsumerFactory already propagates all consumer properties to the underlying KafkaShareConsumer.

Changes:

  • Added unit test verifying the property is retained in factory configuration
  • Added integration test verifying record_limit mode works end-to-end
  • Added documentation for share.acquire.mode in the Share Consumer reference

Fixes gh-4326

@sobychacko sobychacko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together. I left a few inline review comments on the tests in the PR. If you get a chance, take a look at those first. I’d love to keep this PR mostly about documentation. The original issue (#4326) was really about making sure the property behaves as expected when you actually run share consumers in a real app (i.e. you try batch_optimized vs record_limit, see that the broker/client does what you expect, and you’re not fighting Spring’s config along the way). That kind of verification is hard to capture meaningfully in our test suite without basically re-testing the kafka client which is beyond the scope of the issue.

So my ask would be to lean only on the docs in this PR, and if you learn anything new and interesting while trying it on a real app (gotchas, what you observed, broker version, etc.), drop a short summary on the GitHub issue too so the community who run into any issues can learn from it. We can also aggregate that information into out docs too. What do you think? Happy to merge once it’s trimmed down along those lines.

Comment thread spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/kafka-queues.adoc Outdated
…g's config model

Verify that the share.acquire.mode property passes through Spring's config model correctly.

The property is a pass-through consumer configuration that requires no
changes to ContainerProperties or ShareKafkaMessageListenerContainer.
DefaultShareConsumerFactory already propagates all consumer properties
to the underlying KafkaShareConsumer.

Changes:
- Added unit test verifying the property is retained in factory configuration
- Added integration test verifying record_limit mode works end-to-end
- Added documentation for share.acquire.mode in the Share Consumer reference

Fixes spring-projectsgh-4326

Signed-off-by: Maxwell Balla <ballamaxwell7@gmail.com>
@sobychacko sobychacko merged commit 15e7ef6 into spring-projects:main Apr 14, 2026
3 checks passed
@sobychacko

Copy link
Copy Markdown
Contributor

Thanks, @maxwell-balla as always. PR has been merged upstream now.

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.

Verify share.acquire.mode (KIP-1206) works through Spring's config model

2 participants