Skip to content

Discover RPC clients through a RpcClientProvider SPI - #513

Open
ppkarwasz wants to merge 1 commit into
feat/flume-clientfrom
feat/rpc-client-provider
Open

ppkarwasz wants to merge 1 commit into
feat/flume-clientfrom
feat/rpc-client-provider

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

RpcClientFactory referred to the Avro and Thrift clients by class name, although they now live in logging-flume-rpc, and created them reflectively before configuring them. Clients are now created by RpcClientProviders discovered with ServiceLoader and selected by client.type; an unregistered provider can still be named by its class.

Providers are registered with BND's @ServiceProvider, as in Log4j, which also generates the JPMS provides/uses clauses and the OSGi capabilities. The ServiceLoader is queried on each call, so providers can come and go.

The types only needed by client implementations (AbstractRpcClient, SSLContextAwareAbstractRpcClient, HostInfo and the new RpcClientProvider) move to org.apache.flume.client.spi.

Stacked on #511. The transports register their providers in apache/logging-flume-rpc.

🤖 Generated with Claude Code

`RpcClientFactory` referred to the Avro and Thrift clients by class name, although they live in other repositories, and created them reflectively before configuring them. Clients are now created by providers discovered with `ServiceLoader` and selected by name through `client.type`; an unregistered provider can still be named by its class. Providers are registered with BND's `@ServiceProvider`, which also generates the JPMS and OSGi metadata.

The types only needed by client implementations move to the new `org.apache.flume.client.spi` package.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@ppkarwasz
ppkarwasz added this pull request to stack #512 October 5, 2026 20:01
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