Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): auto register pubsub storage configurable #87

Conversation

stephenlautier
Copy link
Contributor

@stephenlautier stephenlautier commented Jun 26, 2019

Features

config: configurable auto register pubsub

Mainly this was added as I had a teething issue due to it, basically, storage grain such as redis/dynamodb weren't working due to this, and the only option had to move UseSignalR further down the chain otherwise it throws a weird exception.

To be honest, I think the auto-register PubSub might not be a good idea since then configuring PubSub afterwards seems to be causing issues

@stephenlautier stephenlautier changed the title feat(config): auto register pubstub storage configurable feat(config): auto register pubsub storage configurable Jun 26, 2019
@stephenlautier
Copy link
Contributor Author

@galvesribeiro any updates on this?

@galvesribeiro
Copy link
Member

Sorry, missed this.

So, the point on that is to only register the pubsub store if none was provided.

I've recently working on a stream provider which fall on the same situation...

We decided to not register it at all and let the user do that for by thenselves and throw a meanful exception in case one wasn't registered.

Add that property actually goes against what DI would stands for by making a dependency become a configuration option...

What do you think?

IMHO, not registering anything and explicitly throw is better if we mention on the docs the user has to explicitly register a PubSubStore...

Thoughts?

@stephenlautier
Copy link
Contributor Author

Basically, that's what I wanted to do, to not register anything and let the consumer do it. The only reason I did it this way is so its not breaking, but if you're ok with making it breaking its good for me.

What I'm not sure is how you would throw if its not registered, as in how would you check?
Feel free to close this PR and do that as it might be faster to do so.

galvesribeiro added a commit to galvesribeiro/SignalR.Orleans that referenced this pull request Jul 5, 2019
@galvesribeiro
Copy link
Member

Ok cool, check #88 please.

Thanks for the PR!

galvesribeiro added a commit that referenced this pull request Jul 8, 2019
* Added options validator as discussed on #87

* Re-added internal state registration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants