On Sat, Dec 17, 2016 at 3:55 AM, oleksiys <[email protected]> wrote:

> Hmm, I dynamically create a sub-stream as a reaction to a certain stream
> event, so not sure how exactly alsoTo can help here.
>

Ok, so that is a different problem. You are basically trying to reimplement
splitWhen (or maybe groupBy)?

-Endre


>
> Thanks.
>
> WBR,
> Alexey
>
> On Friday, December 16, 2016 at 12:00:47 AM UTC-8, drewhk wrote:
>>
>> Why use Hub for this? There is a race when the actual side-channel is
>> attached, hence it can miss some of the initial elements. You can either
>> just use normal broadcast or the combinator alsoTo.
>>
>> On Fri, Dec 16, 2016 at 12:22 AM, oleksiys <[email protected]> wrote:
>>
>>> I'll try to give more context, maybe it'll help to understand the
>>> problem.
>>>
>>> I have a PersistenceQuery event stream and when I see certain event (say 
>>> *EventEnvelope(sequenceNr
>>> = 1234, event = CreateChild)*) - I create a sub-flow (child flow) of
>>> the current flow, but there's a requirement, that the sub-flow stream must
>>> not miss the event with the sequenceNr == 1234. So I can tolerate if the
>>> first sub-flow event sequenceNr <= 1234, but it shouldn't be larger.
>>> Maybe there's a better way to achieve this?
>>>
>>> Thanks.
>>>
>>> WBR,
>>> Alexey
>>>
>>>
>>> On Thursday, December 15, 2016 at 12:57:53 AM UTC-8, oleksiys wrote:
>>>>
>>>> Hi guys,
>>>>
>>>> is there some guarantees wrt initial message I'd receive on a stream,
>>>> that is attached to a BroadcastHub.
>>>> I mean in general there's probably no guarantees, but what if I'm
>>>> trying to attach a new stream to a BroadcastHub, from the stream, that is
>>>> already attached to it.
>>>>
>>>> Imagine something like:
>>>>
>>>> val hubSrc = Source(1 to 65536)
>>>>   .toMat(BroadcastHub.sink[Int](HubBufferSize))(Keep.right)
>>>>   .run()
>>>>
>>>>
>>>> hubSrc
>>>>   .map(v => if (v == 256) hubSrc.runForeach(println))
>>>>   .runWith(Sink.ignore)
>>>>
>>>>
>>>> Is it guaranteed that output will *always* start with a number, that is
>>>> less or equal to 256?
>>>>
>>>> Thank you.
>>>>
>>>> WBR,
>>>> Alexey
>>>>
>>> --
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c
>>> urrent/additional/faq.html
>>> >>>>>>>>>> Search the archives: https://groups.google.com/grou
>>> p/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 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
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