I had found the issue. The reason was frame coding. I supposed that every 
message is send in single tcp packet but it is not. Now I have implemented 
frame coding/decoding and everything is fine. Thank you for answers!

четверг, 19 марта 2015 г., 15:54:46 UTC+3 пользователь zergood написал:
>
> Hi!
>
> I want to stream file lines through tcp to server.
>
> Here is the code:
>
> class StreamingTcpActor(remoteAddress:InetSocketAddress, system: ActorSystem){
>   implicit val actorSystem = system
>   implicit val materializer = ActorFlowMaterializer()
>
>   val connection = StreamTcp().outgoingConnection(remoteAddress)
>   val file = scala.io.Source.fromFile(new File("./logfile.txt"))
>   val lines = file.getLines()
>
>   Source(() => file.getLines()).map(line => {
>     val message = MessageWithId(UUID.randomUUID().toString, line)
>     RunTcpStreamEx.messageSerializer.toByteString(message)
>   }).via(connection.flow).to(Sink.ignore).run()
> }
>
>
> Problem: Some lines were not send to the network.
> If I rewrite client code with out akka-streaming everything would be ok. 
>
> I am new to akka streams. Could you provide me some doc links to figure 
> out what`s wrong here.
>

-- 
>>>>>>>>>>      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.

Reply via email to