Hi Abhijit, You didn't include the "host" variable. Is it pointing to the proper TLS address? If not, we have a known bug that will be fixed in 1.1 that caused TLS connections just go silent if you accidentally connected to a plain-text port. I have a suspicion that this bug hit you here.
-Endre On Fri, Oct 2, 2015 at 7:34 AM, Abhijit Sarkar <[email protected]> wrote: > 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. > -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> 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.
