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

Add option to customise close() wait (fixes #901) #902

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

agarciadom
Copy link
Contributor

This pull request proposes a new option to customise how long we wait for each KafkaStreams to close, as a fix for #901.

If you have a better idea for the name of the option, please let me know. I was not sure whether to go with kafka.streams.close-seconds or kafka.streams-close-seconds.

@CLAassistant
Copy link

CLAassistant commented Oct 24, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ jeremyg484
❌ agarciadom
You have signed the CLA already but the status is still pending? Let us recheck it.

@sdelamo
Copy link
Contributor

sdelamo commented Nov 9, 2023

@jeremyg484 please, follow-up this PR from @agarciadom

@jeremyg484
Copy link
Contributor

@agarciadom Thanks for your initial work on this. I've gone ahead and picked up the PR and done the configuration in a bit more of a typical Micronaut way using @ConfigurationProperties as Sergio had suggested above. If you get a chance to try these updates out to ensure it satisfies your use case that would be great!

@agarciadom
Copy link
Contributor Author

agarciadom commented Jan 23, 2024

Thank you for the changes! Apologies for not being able to do it myself: I was busy with my teaching and I wasn't entirely sure about how to follow the suggested approach.

I'll try out your proposed changes :-).

@agarciadom
Copy link
Contributor Author

I can confirm that with the PR, I can replace my manual workaround with this addition to my application-test.yml file:

kafka:
  streams:
    default:
      close-timeout: 60s

I'm not sure why it takes so long to shutdown after my last test (that's for another discussion, I guess!), but at least it does get the tests to pass.

Thank you for your work!

@jeremyg484
Copy link
Contributor

I can confirm that with the PR, I can replace my manual workaround with this addition to my application-test.yml file:

kafka:
  streams:
    default:
      close-timeout: 60s

I'm not sure why it takes so long to shutdown after my last test (that's for another discussion, I guess!), but at least it does get the tests to pass.

Thank you for your work!

Great, glad it's working for you!

I've been seeing the same issue with it taking a long time to shutdown the streams sometimes in our tests. As far as I can tell, it's something purely on the Kafka side of things and not anything we're doing wrong in the module. It is something I intend to dig into separately though as it's making running the whole streams test suite quite sluggish.

@sdelamo sdelamo merged commit 6f7db64 into micronaut-projects:master Mar 7, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants