0

I have a clustered system that has a number of different entity types with different memory and computation complexity characteristics and would like to use active-entity-limit in my Passivation Strategy to use different limits for each type, since some could easily support thousands per shard region, while others should only support 100s.

I can't find any way to do this with the existing PassivationStrategySettings, nor can I find any documentation on how to define my own Passivation Strategy programmatically. Is there a place to hook into the ShardRegion to effect this type of behavior?

1 Answer 1

1

You can use ClusterShardingSettings.PassivationStrategySettings.apply(Config) to load passivation config from an arbitrary config, for example picked up from some path you defined in your application.conf using something along the lines of system.settings.config.getConfig("my-app.passivation-for-a"), then set it on the cluster sharding settings using ClusterShardingSettings#withPassivationStrategy.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.