DanielaSfregola / twitter4s

An asynchronous non-blocking Scala client for both the Twitter Rest and Streaming API
Apache License 2.0
256 stars 101 forks source link

Error handling for "external" errors #142

Open nilsga opened 6 years ago

nilsga commented 6 years ago

When the tweet processing function encounters a non internal error, such as a database error, the stream halts without any information given. This is probably due to the default error handling strategy of Akka Streams, which stops the entire stream when an error is encountered, as described at https://doc.akka.io/docs/akka/current/scala/stream/stream-error.html. It should be possible to configure twitter4s with a different error handling strategy, or clarify if this is outside the scope of the library, and should be handled by dispatching the tweets to a different system/stream.

DanielaSfregola commented 6 years ago

This would be a great improvement: we should change the twitter streaming so that it can survive errors unrelated to the streaming itself