frankvicky opened a new pull request, #22511:
URL: https://github.com/apache/kafka/pull/22511
JIRA: KAFKA-20622
This PR is a part of KIP-1331.
Public SPI under `org.apache.kafka.coordinator.group.api.streams`
(`group-coordinator-api` module), marked `@InterfaceStability.Evolving`:
- `StreamsGroupTopologyDescriptionPlugin` — `Configurable + AutoCloseable`
interface with three `CompletableFuture`-returning methods
(`setTopology`, `deleteTopology`, `getTopology`), matching the contract
described in KIP-1331.
- `StreamsGroupTopologyDescription` — broker-side POJO mirroring the wire
schema common struct from `StreamsGroupTopologyDescriptionUpdateRequest`.
Uses a sealed `Node` interface (`Source` / `Processor` / `Sink`); successor
edges only — predecessors are reconstructed by callers.
- `StreamsTopologyDescriptionPermanentFailureException` and
`StreamsTopologyDescriptionTransientFailureException` — both extend
`ApiException`. Plugins use these on the future's completion to signal
whether the broker should ratchet `LastFailedTopologyEpoch` or arm the
per-group transient back-off.
- `package-info.java` for the new package.
Reference implementation in the `server` module:
- `InMemoryTopologyDescriptionPlugin` — `ConcurrentHashMap`-backed reference
plugin intended for tests and as a template; stores at most one description
per group and serves it only when the requested epoch matches. Not suitable
for production.
Broker configuration:
- New config `group.streams.topology.description.plugin.class`
(`Type.CLASS`, default `null`, importance `MEDIUM`) on
`GroupCoordinatorConfig`.
Exposed via `streamsGroupTopologyDescriptionPlugin()` returning
`Optional<StreamsGroupTopologyDescriptionPlugin>`, instantiated and
`configure`d once via `AbstractConfig.getConfiguredInstance`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]