-
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
support error handling for KafkaActorSubscriber #29
Comments
like add a invoker to props
|
You can supervise a |
yes I just found the refactory here |
There's another way to handle subscriber errors: val sinkDecider: Supervision.Decider = {
case _ => Supervision.Resume // Your error handling
}
Source(publisher)
.map(_.message().toUpperCase)
.to(Sink(subscriber).withAttributes(ActorAttributes.supervisionStrategy(sinkDecider)))
.run() |
@kciesielski once I realized that I could return the props ,I just attach it as a child actor and the override the supervison strategy.
will the solution you described here works? |
@hepin1989 Thanks for finding this :) Indeed, I wrote some tests and looks like this decider will never be called. So it looks like the only way to catch exceptions now is to use something similar to the method described in the |
I here the encoder may cause an error,and I don't want the actor subscriber to fail.I can't find anyway to handle it.
the akka doc said :
The text was updated successfully, but these errors were encountered: