-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow setting Store Id per request for multi tenant implementations #150
Comments
Thanks @joarobles for raising! Yes, the Java SDK should support per-request storeId override, as the Go, .NET, and JS SDKs do. For any method that includes a storeId in the path, we should allow for an per-request override, and if set use that. We should be able to do this just as we handle for |
Excellent @jimmyjames! If you give me a couple of hints I can try to submit a PR |
❤ that would be great @joarobles! I pushed a temporary branch with an example of how it could look for
In general, it should be pretty similar to how the Hope that helps! |
Excellent, I'm on it! |
Describe the problem you'd like to have solved
In multitenant solutions it would be nice to have a single
client
instance and the possibility to set thestore id
for each request, this way the connection pool can be reused without the need to have multiple client instances.Describe the ideal solution
The store id should available as a client option:
Alternatives and current workarounds
There are two alternatives:
fgaClient.setStoreId(store.getId());
on each request, but my guess is there could be race condition issuesAdditional context
N/A
The text was updated successfully, but these errors were encountered: