Skip to content

feat: add request level timeout#287

Merged
crepererum merged 3 commits intoinfluxdata:mainfrom
WenyXu:feat/request-timeout
Feb 11, 2026
Merged

feat: add request level timeout#287
crepererum merged 3 commits intoinfluxdata:mainfrom
WenyXu:feat/request-timeout

Conversation

@WenyXu
Copy link
Contributor

@WenyXu WenyXu commented Dec 9, 2025

Closes #

This PR adds support for configuring a request-level timeout for Kafka broker communications. This is separate from the existing connection timeout and allows users to set a maximum duration for individual requests to complete.

  • ClientBuilder: Added a new timeout() builder method to configure the request timeout

  • BrokerConnector: Propagates the timeout configuration to broker connections

  • Messenger: Implements the timeout logic using tokio::time::timeout when sending requests

  • ConnectionHandler: Updated the trait interface to accept both connection_timeout and timeout parameters

  • I've read the contributing section of the project CONTRIBUTING.md.

  • Signed CLA (if not already signed).


let mut response = rx.await.expect("Who closed this channel?!")?;
let mut response = if let Some(timeout) = self.timeout {
tokio::time::timeout(timeout, rx).await.map_err(|_| {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a code comment that captures #285 (comment) here? That would be great for future maintainers & contributors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved in 2c88e16

@WenyXu WenyXu requested a review from crepererum December 23, 2025 06:49
Signed-off-by: WenyXu <wenymedia@gmail.com>
Signed-off-by: WenyXu <wenymedia@gmail.com>
Signed-off-by: WenyXu <wenymedia@gmail.com>
@crepererum crepererum merged commit 3a414b7 into influxdata:main Feb 11, 2026
11 checks passed
@crepererum
Copy link
Collaborator

Thank you for the PR and sorry for the review delay.

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