Giter VIP home page Giter VIP logo

Comments (6)

kciesielski avatar kciesielski commented on May 23, 2024

Thanks, @gvd! Indeed, the logging interface is a bit unfortunate, I'm fixing this to
log.error(ex, "Stopping subscriber due to an error")
I'll try to add some test around it.

from alpakka-kafka.

adamw avatar adamw commented on May 23, 2024

Maybe you could have an ExceptionHandler component, where the default handling would be to log the exceptions, but could provide hooks to e.g. restart the whole stream, try to reconnect, do exponential backoff etc?
Passed as an implicit or parameter with a default value?

from alpakka-kafka.

kciesielski avatar kciesielski commented on May 23, 2024

@adamw Underneath the subscriber is an Akka actor. Errors can be handled with custom behavior using DeathWatch. I'm checking how one can pass more details on exceptions with that.

from alpakka-kafka.

xelax avatar xelax commented on May 23, 2024

I might be wrong, but currently the underlying actor is not returned when building the stream, thus inhibiting the ability to supervise/register for deathwatch of that actor.

from alpakka-kafka.

kciesielski avatar kciesielski commented on May 23, 2024

There is some public API not mentioned in README. You can build your consumer like this:

val consumerActor = reactiveKafka.consumerAsActor[T](...)
val consumer = ActorPublisher[String](consumerActor)

and you have a working ActorRef which you can watch. I'm also trying to make it possible to supervise this actor, so that you can capture full exception when it crashes. Only then I'll fully close this issue.

from alpakka-kafka.

kciesielski avatar kciesielski commented on May 23, 2024

Fixed fully in #23

from alpakka-kafka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.