ppkarwasz opened a new pull request, #528: URL: https://github.com/apache/logging-flume/pull/528
`flume-core` hard-codes, in the `*Type` enums, the class names of components that live in other modules and repositories: e.g. `SourceType.AVRO` had to change for apache/logging-flume-rpc#24. This PR is the first step of replacing those enums with `ServiceLoader` providers, following the `RpcClientProvider` SPI of `flume-sdk`. - Adds the `org.apache.flume.spi` package: `ComponentProvider`, `AbstractComponentProvider`, `ComponentRegistry` and one provider interface per component kind (`SourceProvider`, `SinkProvider`, `ChannelProvider`, `ChannelSelectorProvider`, `SinkProcessorProvider`, `ConfigFilterProvider`, `InterceptorProvider`, `EventSerializerProvider`, `EventDeserializerProvider`, `PathManagerProvider`). - Registers the components of `flume-core` through nested `Provider` classes annotated with `@ServiceProvider`. - Makes the factories resolve `type` in this order: registered alias (case-insensitive), legacy enum alias, fully qualified class name of the component. Conflicting registrations only fail when the ambiguous type is used, and a broken provider is skipped. The enums stay as a fallback, so existing configurations keep working. ## Next steps 1. Register providers in the other modules of this repository (taildir, syslog, netcat UDP, file and spillable channels, config filters, file channel encryption). 2. Register providers in `logging-flume-rpc` and the other component repositories. 3. Remove the `*Type` enums, the legacy-alias constructor and the unused `*ConfigurationType` layer, whose configuration classes do not exist. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
