Hi,
I'm playing with Twitter streaming data and Akka Streams. I've the
following code built on Akka HTTP that creates a connection to Twitter
(using OAuth, that I know is working because if I send a wrong password, I
get an auth error). However, after that, no data seems to flow through the
source because I don't see any data being printed. I'm new to Akka Streams
and am possibly missing something. What'd that be?
val connectionFlow: Flow[HttpRequest, HttpResponse, Future[
OutgoingConnection]] = Http().outgoingConnectionTls(host)
val responseStream = Source.single(httpRequest)
.via(connectionFlow)
.runWith(Sink.head)
responseStream.value.map {
_ match {
case Success(results) => {
results.entity.dataBytes.runForeach { b => println(b.mkString) }
}
case _ => println("Bad Twitter!")
}
}
Log snippet:
2015-10-02 00:31:47.700 [twitter-akka.actor.default-dispatcher-9] [DEBUG] a.
i.TcpOutgoingConnection - Attempting connection to [stream.twitter.com/
199.16.156.217:443]
2015-10-02 00:31:47.791 [twitter-akka.actor.default-dispatcher-7] [DEBUG] a.
i.TcpOutgoingConnection - Connection established to [stream.twitter.com/
199.16.156.217:443]
2015-10-02 00:31:53.383 [twitter-akka.actor.default-dispatcher-8] [DEBUG] a.
s.i.PrefixAndTailImpl - Cancelling akka.stream.impl.
MultiStreamOutputProcessor$SubstreamOutput@2f2b2b76 (after: 5000 ms)
Regards,
Abhijit Sarkar
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.