twitter4s
twitter4s copied to clipboard
Source for use in stream flow
Hi, I might have missed something fundamental, but is it possible to get a Akka Stream Source instead of the client? The use case is to do some stream processing server side and then ship them to the front end using akka-http server sent events (SSE) where you provide need to provide a Source.
Hi @tbje, unfortunately, it is not possible. This was done on purpose, to hide lots and lots implementation details that are not actually needed in order to use the Twitter Streaming API.
All you can do is define what processing you'd like to do for a specific type of message.
Cheers, D.
Thanks for the clarification @DanielaSfregola :+1:
For anyone else wanting something similar: this repo helped me understand howto create a source and hooking it up with the client: https://github.com/calvinlfer/Akka-Streams-custom-stream-processing-examples
Reopening as it would be good to have, so we can do it at the next iteration since we are already introducing breaking changes.
Thanks @tbje I ended up getting it wired up used instructions from here: https://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/stream-integrations.html
Looking forward to having Streams properly working in 6.0. Thanks for the helpful project @DanielaSfregola