Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary timer #243

Merged
merged 1 commit into from
Apr 26, 2023
Merged

Conversation

aesteve
Copy link
Contributor

@aesteve aesteve commented Apr 25, 2023

The call to Kafka producer's partitionFor will fail when max.block.ms duration is reached.
Fixes #59 and replaces #121

Motivation:

Not sure why this setTimer had been implemented in the first place, maybe max.block.ms did not exist at the time, but this is no longer needed.

Calls to producer.send(...) producer.partitionsFor(...) are subject to the max.block.ms configuration parameter, and a TimeoutException will be fired past this duration.

Although the failure no longer gets fired twice (like mentioned before in #59 ), it could introduce some issue in cases the cluster is slow, or network is slow. Say an user HAS to configure max.block.ms to a value greater than 2000, the hardcoded setTimer would fire BEFORE max.block.ms gets reached, which could block some users.

@vietj vietj merged commit 7db0532 into vert-x3:master Apr 26, 2023
@vietj vietj added this to the 5.0.0 milestone Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

KafkaWriteStreamImpl.partitionsFor failure results in two callbacks
2 participants