dehora / nakadi-java

🌀 Client library for the Nakadi Event Broker (examples: http://bit.ly/njc-examples, site: https://dehora.github.io/nakadi-java/)
MIT License
30 stars 19 forks source link

StreamProcessor.Stop doesn't take effect #344

Closed BaraaBathech closed 5 years ago

BaraaBathech commented 5 years ago

While trying to stop a StreamProcessor ( in order to stop event consumption ), I got this error as "info" in the logs, and the event consumption kept working...

[NakadiClient] executor service did not shutdown cleanly java.util.concurrent.Executors$FinalizableDelegatedExecutorService@319003ee

At that time I was using nakadi-java version: 0.9.17, but then upgraded it to 0.13.0, but that didn't help either.

Is there a way to totally shutdown a StreamProcessor?

BaraaBathech commented 5 years ago

We found out that we had two places in the code that start the StreamProcessors. Leaving a referenced one, and a non-referenced one. When ask to stop one, only the referenced gets stopped, while the other one keeps running in the background. We fixed that in our code.

dehora commented 5 years ago

@BaraaBathech thanks for following up, much appreciated. Are you happy this isn't an issue with the library or its documentation?

BaraaBathech commented 5 years ago

@dehora I think it is not related to the library or the documentation, it is more of how the ExecutorService coming with java is behaving.