It should terminate once it has arrived at or passed toSequenceNr.
Otherwise I see no point in that parameter.

toSeqNr=0 is an obvious boundary case, where it can terminate immediately.

Anything else?

/Patrik
sön 21 aug. 2016 kl. 18:10 skrev Aditya Prasad <akpra...@gmail.com>:

> On Sun, Aug 21, 2016 at 9:10 AM, Aditya Prasad <akpra...@gmail.com> wrote:
>
>> Thanks Patrick.
>>
> Sorry... thanks *Patrik*.
>
>> What are the more general conditions under which the stream should
>> terminate?
>>
>> I've come to appreciate the behavior that the stream terminates once it
>> has arrived at or passed toSequenceNr. I wrote a tentative PR for the JDBC
>> impl: https://github.com/dnvriend/akka-persistence-jdbc/pull/66.
>> The alternative in my application is to append a takeWhile() to the
>> stream, plus some extra logic so that it completes when it has delivered
>> item N (and not wait for N+1, which may be a long time coming).
>>
>> On Aug 21, 2016 6:50 AM, "Patrik Nordwall" <patrik.nordw...@gmail.com>
>> wrote:
>>
>> I think it makes sense to complete the stream when it's know that there
>> will be no events matching toSequenceNr.
>>
>> There is an effort to write a TCK for Persistence Query
>> https://github.com/akka/akka/pull/20807
>> Unfortunately the PR has been inactive for a while now. It would be great
>> if community can help out there and complete it. The TCK would be a great
>> place to add tests for the toSequenceNr. Fixing the actual implementations
>> would also be needed, of course.
>>
>> Thanks,
>> Patrik
>>
>> On Sun, Aug 21, 2016 at 7:33 AM, Aditya Prasad <akpra...@gmail.com>
>> wrote:
>>
>>> Does anyone know the expected semantics of eventsByPersistenceId when
>>> toSequenceNr is less than or equal to the journal's latest version?
>>>
>>> In some impls & cases it completes the stream (which makes sense), and
>>> in others it does not (which is hard to work with).
>>>
>>>
>>> On Thursday, August 18, 2016 at 10:52:58 AM UTC-7, Aditya Prasad wrote:
>>>>
>>>> Can anyone else repro this? This future never completes:
>>>>
>>>>     val fut = readJournal.eventsByPersistenceId(tenantId.value, 0,
>>>>> 0).runWith(Sink.head)
>>>>>     val res = Await.result(fut, 10 seconds)
>>>>
>>>>
>>>>
>>>>
>>> --
>>> >>>>>>>>>> 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.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Akka Tech Lead
>> Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
>> --
>> >>>>>>>>>> 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 a topic in the
>> Google Groups "Akka User List" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/akka-user/hl2A6e65gsQ/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.
>

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