When is removeProxy actually called? #349
-
I implemented a custom ProxyManager that wraps the DAPR state management API. But I am not clear when bucket.removeProxy() should be called. I am deleting the state associated with the bucket in the implementation of the call, but I am unclear when to call this method in the application. I would assume that if the bucket limits change, the state should be deleted, but does this mean that the code should monitor bucket configuration changes and if detected, call the bucket.removeProxy() method? Or is the strategy to use bucket.replaceConfiguration()? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hello @sujitdmello ProxyMenager#removeProxy is never called by library itself. It was added in order to simplify unit-tests. You should use replaceConfiguration when you need to reconfigure buckets. Also if your limits are stored just in config file then implicit configuration replacement can be used. |
Beta Was this translation helpful? Give feedback.
Hello @sujitdmello
ProxyMenager#removeProxy is never called by library itself. It was added in order to simplify unit-tests.
You should use replaceConfiguration when you need to reconfigure buckets. Also if your limits are stored just in config file then implicit configuration replacement can be used.