Silo should validate if a PubSubStore is configured or not before starting
Issue: When you setup the streaming, but not adding a storage with the baked in name of "PubSubStore", the Silo starts without errors and then later, when it needs to access the store to persist a subscription it fails during runtime.
Solution: Add additional validation if a "PubSubStore" is registered in DI or not. If not, fail early with configuration exception.
Nice to have: Make "PubSubStore" provider name configurable
Make "PubSubStore" provider name configurable
Already spoke with @jason-bragg about that. Unfortunatelly it is not simple right now. Probably when the revamp happens on Stream APIs we get it outsourced.
Probably when the revamp happens on Stream APIs we get it outsourced.
not sure what triggered this conclusion. the name "PubSubStore" is always hard coded to be the pubsubgrain state store name. This doesn't change after streaming api revamp. How easy to make it configurable doesn't have much to do with streaming, it is how to make a grain state storage name configurable. So I don't quite understand what @galvesribeiro 's points. Mind explain more ?
@attilah I think we can add a validation to see if a "PubSubStore" grain storage is registered into DI. should be trivia, and also bring a lot benefits to users. I personally tripped on this from time to time.
@xiazen, @galvesribeiro, I'll leave the clarification of galvesribeiro's post to him, but the requirement that a user needs be aware that a particular implementation of the pubsub system uses grains which use a specific grain state storage named "pubsubstore" (which needs be configured) is very cryptic and unintuitive. This implementation detail is unrelated to the public stream surfaces, but is the type of shortcoming that should be addressed if we revamp streams.
Recent (and future) refactoring of components allow more options. For instance, if the pubsub grains used storage facets, the name of the grain storage could be configured, rather than being required to always be "pubsubstore". This would be much more intuitive and flexible.
@xiazen
the name "PubSubStore" is always hard coded to be the pubsubgrain state store name
I know, and that is the problem.
@jason-bragg
I'll leave the clarification of galvesribeiro's post to him
Don't need to. As always, you did that for me! 💃
submitted a pr #4273 to add the validation.
fixed in #4273