…and, an empty source is one which signals onComplete before any data has
passed through. :)

On Tue, Mar 22, 2016 at 10:58 AM, Akka Team <akka.offic...@gmail.com> wrote:

> Hi Richard,
>
> There is no other way to detect whether a Source is empty than to run it.
> For example if a Source wraps a DB query then of course it is impossible to
> see if the query will be empty or not without actually materializing and
> hence running the query.
>
> -Endre
>
> On Mon, Mar 21, 2016 at 4:59 AM, Richard Rodseth <rrods...@gmail.com>
> wrote:
>
>> I'm doing a flatMapMerge something like this:
>>
>>     val stream = Source(channelMonths)
>>
>>       .flatMapMerge(10, channelMonth => {
>>
>> ..        Sources.intervalsForChannelMonth(channelMonth, ...)
>>
>>       })
>>
>> I'm implementing some monitoring using alsoTo to send stream elements to
>> a monitoring actor which can keep counts and so forth.
>>
>> How could I detect that the intervals source is sometimes empty? eg.
>> record the channels for which there are 0 intervals?
>>
>>
>> --
>> >>>>>>>>>> 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.
>



-- 
Cheers,
√

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