>> Exactly, so you would have to have another actor (at least one) on each
node that is always alive and subscribes to pubsub and delegates to the
ShardRegion.

So no straightforward way to broadcast to all  instances of an aggregate?


On Thu, Mar 9, 2017 at 10:52 PM, Patrik Nordwall <patrik.nordw...@gmail.com>
wrote:

>
>
> On Thu, Mar 9, 2017 at 7:42 PM, Richard Ney <kamisama....@gmail.com>
> wrote:
>
>> In a sharded system the life-cycle of the actor is controlled by the
>> Shard actor. So if you are subscribing to distributed pub/sub in your
>> actor's constructor or receive method and you passivate there is no way for
>> the Shard actor to respawn your passivated actor because the message isn't
>> coming through the ShardRegion.
>>
>
> Exactly, so you would have to have another actor (at least one) on each
> node that is always alive and subscribes to pubsub and delegates to the
> ShardRegion.
>
>
>> Also we found out that unless we call "unsubscribe" in the preStop method
>> we were leaking actor references since the mediator doesn't know your actor
>> no longer exists and just sends the messages to dead-letters.
>>
>
> That sounds wrong. The mediator is watching the subscribers and remove
> them when they are terminated. Please open an issue if you are sure and
> have a repeatable test.
>
>
>>
>> On Thu, Mar 9, 2017 at 9:51 AM, Richard Rodseth <rrods...@gmail.com>
>> wrote:
>>
>>> Is it true that
>>>
>>>    - Passivated (sleeping) actors aren't able to listen to the pub/sub
>>>    topic.
>>>
>>> ?
>>>
>>> Unfortunately there's no answer here:
>>> http://stackoverflow.com/questions/40782570/can-akka-distrib
>>> utedpubsub-deal-with-passivated-subscribers
>>>
>>> On Wed, Mar 8, 2017 at 6:18 PM, Richard Ney <kamisama....@gmail.com>
>>> wrote:
>>>
>>>> Environment:
>>>>
>>>>    - Distributed cluster with persistence sharded actors.
>>>>    - Persistent actors are setup to Passivate when inactive.
>>>>    - All actors have the Backoff Supervisor wrapping the actual
>>>>    persistent actor
>>>>    - Shard regions are common across our users
>>>>
>>>> Problem:
>>>>
>>>>    - At times it's required to reset the actor states
>>>>    - Live actors currently listen to a Distributed Pub/Sub topics for
>>>>    the reset message at which point they reset state and save a snapshot of
>>>>    the state.
>>>>    - Passivated (sleeping) actors aren't able to listen to the pub/sub
>>>>    topic.
>>>>    - Sending message to restore actor just to reset its state is a
>>>>    needless load on the persistence data store since we could play back 
>>>> 1000s
>>>>    of messages before wiping state.
>>>>
>>>> Question:
>>>>
>>>>    - How can I either send a message or pass a dynamic parameter into
>>>>    a Sharded Persistent Actor so I can disable recovery before the actor
>>>>    starts loading from the data store?
>>>>
>>>>
>>>> -Thanks
>>>>
>>>>
>>>> Richard
>>>>
>>>> --
>>>> >>>>>>>>>> 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 a topic in the
>>> Google Groups "Akka User List" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/akka-user/cGrx2jLrn58/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/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.
>>
>
>
>
> --
>
> 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 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