It's right that the BackoffSupervisor doesn't work perfectly together with
Cluster Sharding passivation at the moment. The workaround until we have
better solution in place is:
1. Send Passivate with a custom stop message to the parent
BackoffSupervisor which will pass it on.
2. When the actor receives the custom stop message it can complete it's
final work and then it must *stop the parent* BackoffSupervisor, instead of
stopping itself. That can be done by sending PoisonPill to parent.

Regards,
Patrik

On Fri, Dec 16, 2016 at 5:14 AM, Richard Ney <[email protected]> wrote:

> I've also noticed context.setReceiveTimeout isn't triggering
> ReceiveTimeout when I have the Backoff Supervisor wrapper to my actor.
>
>
> On Thursday, December 15, 2016 at 6:55:48 PM UTC-8, Richard Ney wrote:
>>
>> What is the preferred way of using the Backoff Supervisor with Shard
>> Passivation? I have Passivation implemented using a simple 'stop message as
>> shown below
>>
>> // Passivation Handlers
>> case ReceiveTimeout => context.parent ! Passivate(stopMessage = 'stop)
>> case 'stop          => context.stop(self)
>>
>>
>> But since I'm having issues on application startup with Cassandra getting
>> overwhelmed on the actor journal load I want to add in a BackoffSupervisor
>> to reduce the stress on Cassandra if errors start occurring. Is there a way
>> to keep the passivation code above or is the only approach to use the
>> PoisonPull approach mentioned in issue #19027? We're currently using Akka
>> 2.4.11.
>>
>> -Richard
>>
> --
> >>>>>>>>>> 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.
>



-- 

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