-
Notifications
You must be signed in to change notification settings - Fork 387
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
Graceful shutdown in KafkaActorPublisher #45
Comments
That was my idea a while ago, but unfortunately |
We'll keep working on this. By the way, I hadn't thought in dead watching for this and maybe could work better than cancelling in our case. Thanks for that!. |
Hi, are there any new approaches towards gracefully shutting down the publisher? Jan |
@algermissen 0.8.3 uses |
Thanks @kciesielski, I'll check this out. Closing the ticket. |
As it's mentioned in Handling errors, it's possible to have a publisher or consumer actor supervised by its parent. I'm doing that as follows:
Unfortunately, if the parent actor is stopped then its child actors are also stopped in advance so that the publisher actor is not shutdown gracefully and the kafka consumer is not closed either. So now, my only way to shutdown gracefully is sending a previous cancellation message as follows:
But what happen if the parent actor is unexpectedly stopped?. I think the kafka consumer won't be properly stopped and remain working trying to read from the kafka topic.
As far as I understand, a way to solve this would be overriding
postStop()
inKafkaActorPublisher
and sending the cancellation message there.WDYT?.
Thanks in advance.
The text was updated successfully, but these errors were encountered: