Fair enough. Thanks.

On Tue, Apr 25, 2017 at 4:50 AM, Akka Team <[email protected]> wrote:

> I don't find that sample odd or doing something inherently bad.
>
> You might choose to serialize the whole Offset subtype, but you might also
> decide to serialize the long-value which will take considerable less space,
> may be possible to read directly from a database etc. I consider that
> design decisions, the sample is just there to show that you would start
> from a stored offset and store offset as the query progress.
>
> --
> Johan
> Akka Team
>
> On Thu, Apr 13, 2017 at 11:30 PM, Richard Rodseth <[email protected]>
> wrote:
>
>> Congrats on the release of 2.5.
>>
>> Isn't the documentation and accompanying sample for Resumable Projections
>> a bit odd?
>>
>> http://doc.akka.io/docs/akka/2.5.0/scala/persistence-query.h
>> tml#Resumable_projections
>> https://github.com/akka/akka/blob/master/akka-docs/rst/scala
>> /code/docs/persistence/query/PersistenceQueryDocSpec.scala
>>
>> Why would we be constructing a Sequence? Wouldn't the offset be stored in
>> a plugin-agnostic way and just passed back? In my case, the offset is in a
>> Protobuf persistence event, and I'm assuming I would have to convert it
>> (whether Long or TimeUUID) to a ByteString and use a Protobuf field of type
>> "bytes".
>>
>>
>>    1. bidProjection.latestOffset.foreach { startFromOffset =>
>>    2. readJournal
>>    3. .eventsByTag("bid", Sequence(startFromOffset))
>>    4. .mapAsync(8) { envelope => (writer ? envelope.event).map(_ =>
>>    envelope.offset) }
>>    5. .mapAsync(1) { offset => bidProjection.saveProgress(offset) }
>>    6. .runWith(Sink.ignore)
>>
>> --
>> >>>>>>>>>> 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/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.
>

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