twitter4s icon indicating copy to clipboard operation
twitter4s copied to clipboard

Source for use in stream flow

Open tbje opened this issue 7 years ago • 5 comments

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.

tbje avatar Oct 24 '17 10:10 tbje

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.

DanielaSfregola avatar Oct 24 '17 10:10 DanielaSfregola

Thanks for the clarification @DanielaSfregola :+1:

tbje avatar Oct 24 '17 11:10 tbje

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

tbje avatar Oct 24 '17 11:10 tbje

Reopening as it would be good to have, so we can do it at the next iteration since we are already introducing breaking changes.

DanielaSfregola avatar Nov 08 '17 20:11 DanielaSfregola

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

niij avatar Nov 09 '17 05:11 niij