Skip to content

Make RpcClient AutoCloseable and throw FlumeClientException from close() - #525

Merged
ppkarwasz merged 1 commit into
trunkfrom
feat/rpc-client-autocloseable
Nov 8, 2026
Merged

ppkarwasz merged 1 commit into
trunkfrom
feat/rpc-client-autocloseable

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

Since #511, RpcClient extended Closeable, so close() threw the checked IOException. Callers had to handle a checked exception only for closing the client, while every other client method reports failures with the unchecked FlumeClientException (#520).

RpcClient now extends AutoCloseable and close() throws FlumeClientException, so clients still work with try-with-resources. The examples in the Developer Guide no longer need throws IOException.

The Avro and Thrift clients in apache/logging-flume-rpc override close() throws IOException and need a matching change once this is merged.

🤖 Generated with Claude Code

…m `close()`

Extending `Closeable` made `close()` throw the checked `IOException`, so callers had to handle a checked exception only for closing, while every other client method reports failures with the unchecked `FlumeClientException`.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@ppkarwasz
ppkarwasz enabled auto-merge (squash) November 8, 2026 21:47
@ppkarwasz
ppkarwasz merged commit 2a65025 into trunk Nov 8, 2026
12 checks passed
@ppkarwasz
ppkarwasz deleted the feat/rpc-client-autocloseable branch November 8, 2026 21:51
ppkarwasz added a commit to apache/logging-flume-rpc that referenced this pull request Nov 8, 2026
Since apache/logging-flume#525, `RpcClient` extends `AutoCloseable` and its `close()` throws the unchecked `FlumeClientException`, so the transport clients can no longer declare `IOException`.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
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