You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "arnabnandy7 (via GitHub)" <gi...@apache.org> on 2026/09/03 18:23:59 UTC
[PR] KAFKA-20856: Add per-buffer headers configuration to suppress [kafka]
arnabnandy7 opened a new pull request, #23352:
URL: https://github.com/apache/kafka/pull/23352
## Summary
KAFKA-20856: Adds per-buffer control over headers support for the Kafka Streams `suppress()` operator.
Suppression buffers currently determine whether headers should be stored exclusively from the global `dsl.store.format` configuration. Unlike state stores configured through `Materialized`, applications cannot override that behavior for an individual suppression operator.
This change adds the following methods to `Suppressed.BufferConfig`:
- `withHeadersEnabled()`
- `withHeadersDisabled()`
The per-buffer setting takes precedence over `dsl.store.format`. When neither method is called, the suppression buffer continues to follow the global configuration, preserving existing behavior.
The headers setting is retained when chaining other buffer configuration methods, including size limits, logging options, and buffer-full strategies.
## Implementation
The optional headers override is carried through the immutable suppression buffer configuration classes and passed to `InMemoryTimeOrderedKeyValueChangeBuffer`.
During store initialization, the buffer resolves headers support in this order:
1. Use the per-buffer override when explicitly configured.
2. Otherwise, fall back to the global `dsl.store.format` setting.
This preserves the existing global configuration behavior while providing the per-operator control available to other stateful DSL operations.
## Documentation
Updated the following documentation:
- Streams configuration guide
- Streams DSL API guide
- Streams upgrade guide
The documentation describes the new methods, their precedence over `dsl.store.format`, and the unchanged default behavior.
## Testing
Added a focused unit test verifying that enabled and disabled headers settings are preserved across immutable buffer-configuration chains, including:
- Buffer-size changes
- Buffer-full strategy changes
- Logging configuration changes
The following are targeted verification:
```shell
./gradlew streams:test --tests org.apache.kafka.streams.kstream.SuppressedTest
./gradlew streams:test --tests org.apache.kafka.streams.kstream.internals.SuppressHeadersScenarioTest
./gradlew streams:checkstyleMain streams:checkstyleTest streams:spotlessCheck
```
Reviewers: Matthias J. Sax (@mjsax )
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-20856: Add per-buffer headers configuration to suppress [kafka]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23352:
URL: https://github.com/apache/kafka/pull/23352#issuecomment-5738951587
A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the `triage` label
should be removed to prevent this automation from happening again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org