Skip to content

Pool consumer and Kafka Streams wrapper objects - #2051

Merged
masesdevelopers merged 84 commits into
masterfrom
1903-update-keyvaluek-v-tjvmk-tjvmv-to-use-object-pooling
Oct 27, 2026
Merged

masesdevelopers merged 84 commits into
masterfrom
1903-update-keyvaluek-v-tjvmk-tjvmv-to-use-object-pooling

Conversation

@masesdevelopers

@masesdevelopers masesdevelopers commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add object pools for key-value, windowed, timestamped, and aggregation-with-headers wrappers. Route iterator and session-store creation through pooled factories, and return wrappers to their pools when disposed.

Reduce wrapper allocation churn by pooling consumer records, enumerators, and stream state wrappers. Dispose nested wrappers when their parent is disposed.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…2-6-10' of https://github.com/masesgroup/KNet into 92-knet-shall-be-always-aligned-to-latest-jnet-release-2-6-10
Removed obsolete parameter 'delta' from LastPartitionOffsetForTopic method documentation.
Add object pools for key-value, windowed, timestamped, and aggregation-with-headers wrappers. Route iterator and session-store creation through pooled factories, and return wrappers to their pools when disposed.
@masesdevelopers masesdevelopers self-assigned this Oct 22, 2026
@masesdevelopers
masesdevelopers requested a review from a team as a code owner October 22, 2026 15:51
@masesdevelopers masesdevelopers added the enhancement New feature or request label Oct 22, 2026
@masesdevelopers masesdevelopers added the KNet KNet related issue label Oct 22, 2026
@masesdevelopers masesdevelopers linked an issue Oct 22, 2026 that may be closed by this pull request
@masesdevelopers masesdevelopers added the KNet Streams SDK KNet Streams SDK related issue label Oct 22, 2026
Reduce wrapper allocation churn by pooling consumer records, enumerators, and stream state wrappers. Dispose nested wrappers when their parent is disposed.
@masesdevelopers masesdevelopers changed the title Pool Kafka Streams value wrappers Pool consumer and Kafka Streams wrapper objects Oct 22, 2026
@masesdevelopers
masesdevelopers force-pushed the 1903-update-keyvaluek-v-tjvmk-tjvmv-to-use-object-pooling branch from a6847d8 to dcf9d73 Compare October 25, 2026 00:55
…ng' of https://github.com/masesgroup/KNet into 1903-update-keyvaluek-v-tjvmk-tjvmv-to-use-object-pooling
Mark static wrapper object pools as readonly and make ConsumerRecordsState and its fields readonly to prevent unintended reassignment.
Removed obsolete parameter 'delta' from LastPartitionOffsetForTopic method documentation.
…ate-keyvaluek-v-tjvmk-tjvmv-to-use-object-pooling
@masesdevelopers
masesdevelopers removed this pull request from stack #2042 October 27, 2026 15:11
Base automatically changed from update-version-45 to master October 27, 2026 15:29
@masesdevelopers
masesdevelopers merged commit 1f41d43 into master Oct 27, 2026
5 checks passed
@masesdevelopers
masesdevelopers deleted the 1903-update-keyvaluek-v-tjvmk-tjvmv-to-use-object-pooling branch October 27, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request KNet Streams SDK KNet Streams SDK related issue KNet KNet related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update KeyValue<K, V, TJVMK, TJVMV> to use object pooling

1 participant