Ok, so getting closer, seems to work :) Thanks a lot for the help.

On the sender side I added a separate flow for the input stream, attached 
an on complete drain and I get the callback. One small thing, even if I 
kill the other side of the connection, the callback contains a Success(()).

On the receiver side I added the forking (broadcast), and I'm getting the 
callback when the other side is killed.
 
>
> Doesn't it mean that there should be a way to provide a callback or sth 
>> like that when creating the specific Subscriber, here it's implemented by 
>> the TCP extension? E.g. a Future or similar as part of the binding: 
>> StreamTcp.OutgoingTcpConnection?
>>
>
> The input stream conveys all the information you need about closing 
> events, I don't see the need currently for a side-channel. We prefer to 
> keep as much as possible in-stream and not out-of-stream. Since TCP is a 
> stream in itself it works quite well, unlike with the file example I had 
> where there is a pure sink. That said, we might add more functionality if 
> needed but the design goal is to keep these external signals minimal.
>

Sure, this makes sense. Having as little of an additional protocol as 
possible is certainly nice. Though the fact that a socket died doesn't 
always require protocol support (I mean, often you will know that a socket 
isn't working without sending special pings or such). So this could get 
exposed to the user.

Adam

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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