Skip to content

Register the components of the other modules through ServiceLoader - #529

Merged
ppkarwasz merged 2 commits into
trunkfrom
feat/component-providers-modules
Nov 9, 2026
Merged

ppkarwasz merged 2 commits into
trunkfrom
feat/component-providers-modules

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

Stacked on #528: review and merge that one first, then this PR's base will switch to trunk.

Second step of replacing the *Type enums with ServiceLoader providers: the modules of this repository register their own type aliases, so flume-core no longer needs their class names.

  • Sources: taildir, syslogtcp, multiport_syslogtcp, syslogudp, netcatudp.
  • Channels: file, spillablememory.
  • Configuration filters: env, external. These implement org.apache.flume.configfilter.ConfigFilterProvider from flume-config-filter-api, so the filter modules still don't depend on flume-core.

Each module gets a nested Provider class annotated with @ServiceProvider and a test that checks the registration through ServiceLoader.

CipherProviderType and KeyProviderType in flume-file-channel are left unchanged: they only reference classes of the same module.

Known limitation

No Flume module exports any package yet (logging-parent only exports packages annotated with @Export), so on the module path the provides clauses generated here fail to resolve. On the classpath, which bin/flume-ng uses, everything works. This will be fixed in a separate PR that adds @Export to the public API packages.

🤖 Generated with Claude Code

@ppkarwasz
ppkarwasz added this pull request to stack #531 November 9, 2026 20:43
Base automatically changed from feat/component-providers to trunk November 9, 2026 21:30
Each module now registers its own `type` aliases, so `flume-core` no longer needs to know their class names.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@ppkarwasz
ppkarwasz force-pushed the feat/component-providers-modules branch from e4de2bd to 7f482a9 Compare November 9, 2026 21:40
The exported component packages reference it, so bnd rejects the build since #528 and #532 were both merged.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@ppkarwasz
ppkarwasz enabled stacked auto-merge (squash) November 9, 2026 21:46
@ppkarwasz
ppkarwasz merged commit 23c9b0f into trunk Nov 9, 2026
12 checks passed
@ppkarwasz
ppkarwasz deleted the feat/component-providers-modules branch November 9, 2026 22:25
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.

2 participants