Stream can not be received in a few minutes
See original GitHub issueWhen the stream stops, no error is displayed. How can I improve the fault tolerance of my application?
example codes
// main.scala
import com.danielasfregola.twitter4s.entities.enums.Language
import com.danielasfregola.twitter4s.{TwitterStreamingClient}
import com.danielasfregola.twitter4s.entities.{Tweet}
object main {
def main(args: Array[String]): Unit = {
val streamingClient = TwitterStreamingClient()
streamingClient.sampleStatuses(Seq(Language.Japanese)) {
case tweet: Tweet => println(tweet.text)
case other => println(other)
}
println("Pooling...")
if (io.StdIn.readLine != null) {
println("Shutdown")
streamingClient.system.terminate()
}
}
}
// build.sbt
scalaVersion := "2.11.8"
resolvers += Resolver.sonatypeRepo("releases")
libraryDependencies ++= {
val akkaVersion = "2.4.16"
Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.danielasfregola" %% "twitter4s" % "4.0"
)
}
fork in run := true
connectInput in run := true
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Troubleshoot your YouTube live stream - Google Help
If you're logging into YouTube from a 3rd party streaming software and are not using a stream key. Contact the software's support team...
Read more >Troubleshooting live events in Microsoft Stream (Classic)
In general, it can take a few minutes to get the setup going before you can start pushing your encoder. It is possible...
Read more >How to Troubleshoot Live Streaming Issues with Broadcasting
If viewers can't see your live stream, they should be able to, but you should ensure your restrictions are configured properly. You may...
Read more >Troubleshoot Live video | Meta Business Help Center
Avoid connectivity issues · If you have concerns about your internet quality, ensure your stream isn't configured to end in case of an...
Read more >Can't Watch Because Twitch Stream Keeps Buffering? Fix It!
Buffering – you have to pause the video and give it a few minutes to load more before playing it. For live video...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @kamijin-fanta, what about something like the following?
In general, the idea is that when a stream is completed a
Future[Unit]
will be returned. That future contains information on the connection of the stream, so in your case it will contain that the stream failed because of network issues.@aron-bordin could you please open a new issue? This issue has already been closed. Also, it would be great if you could include a representative fragment of your code.