We have a "keepAlive" combinator for injecting idle messages.

-Endre

On Fri, May 6, 2016 at 7:21 PM, Konrad Malawski <
konrad.malaw...@lightbend.com> wrote:

> LOL, me too – totally forgot we have that one...! Of course we do.
> Happy hakking / Have a nice weekend :-)
>
> --
> Konrad `ktoso` Malawski
> Akka <http://akka.io> @ Lightbend <http://lightbend.com>
>
> On 6 May 2016 at 19:15:38, rklaehn (rkla...@gmail.com) wrote:
>
> Never mind. I guess I should stop coding and just enjoy the nice
> weather...
>
>
> http://doc.akka.io/docs/akka/2.4.4/scala/stream/stream-cookbook.html#injecting-keep-alive-messages-into-a-stream-of-bytestrings
>
> On Friday, May 6, 2016 at 7:08:56 PM UTC+2, rklaehn wrote:
>>
>> Hi all,
>>
>> I am currently porting some code using spray websockets to akka-http. I
>> need to inject a ping message into a stream to the client when no message
>> has been sent for some predefined duration. Of course I could just merge
>> with a regular stream of pings, but that would send unnecessary pings.
>>
>> Is there a predefined stage for something like this? I checked the Timer
>> driven stages section, but did not find anything immediately fitting. The
>> tricky thing is that the timer needs to start again every time a message
>> passes through. In the old, naked actor based code this was handled using a
>> simple setReceiveTimeout.
>>
>> Any idea,
>>
>> Rüdiger
>>
> --
> >>>>>>>>>> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> >>>>>>>>>> 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 https://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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to