Also, a little off topic, but since I have your attention :)
I'd like to have snapShotInterval be configurable, but sharded actors don't
take constructor parameters and I'd rather not load config in the actor.
Do people typically have an Init message for sharded actors, that contains
this sort of config?

On Thu, Jan 26, 2017 at 7:40 AM, Richard Rodseth <rrods...@gmail.com> wrote:

> Good to know!
>
> https://github.com/akka/akka/issues/22233
>
> On Thu, Jan 26, 2017 at 7:25 AM, Patrik Nordwall <
> patrik.nordw...@gmail.com> wrote:
>
>> There is already a counter (the sequence number) that you can use.
>>
>> if (lastSequenceNr % snapShotInterval == 0 && lastSequenceNr != 0)
>>
>> On Thu, Jan 26, 2017 at 3:53 PM, Konrad Malawski <
>> konrad.malaw...@lightbend.com> wrote:
>>
>>> B, it's async anyway.
>>>
>>> --
>>> Konrad `ktoso` Malawski
>>> Akka <http://akka.io> @ Lightbend <http://lightbend.com>
>>>
>>> On 26 January 2017 at 15:48:58, Richard Rodseth (rrods...@gmail.com)
>>> wrote:
>>>
>>> a) or b) ?
>>>
>>> a)
>>>
>>>         if (count % snapShotInterval == 0) {
>>>
>>>           self ! SaveSnapShot
>>>
>>>         }
>>>
>>>
>>> b)
>>>
>>>         if (count % snapShotInterval == 0) {
>>>
>>>           saveSnapshot(...)
>>>
>>>         }
>>>
>>>
>>> --
>>> >>>>>>>>>> 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 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/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 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/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 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