java-sdk icon indicating copy to clipboard operation
java-sdk copied to clipboard

Support executor customization of client batch request

Open flex-seongbok opened this issue 5 months ago • 1 comments

Checklist

Describe the problem you'd like to have solved

OpenFgaClient creates a new executor on client batch api request https://github.com/openfga/java-sdk/blob/a7fa8843a1d24605bf769d411bda26875b7ce610/src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java#L616

We can't configure thread pool to support virtual thread or graceful shutdown.

Describe the ideal solution

Use injected executor or provide customizer

Alternatives and current workarounds

No response

References

No response

Additional context

No response

flex-seongbok avatar Jul 02 '25 04:07 flex-seongbok

Thanks for raising @flex-seongbok!

Can you provide a bit more context about the issues you are having and how the ability to customize the executor would help? We currently have the ability to pass in the max parallel requests which is used to customize the executor; do you envision additional options being added like that, or instead (potentially replacing long term?) have the ability to provide a custom executor?

I don't believe we currently support using a custom executor for other HTTP requests in this SDK (I could be wrong, just looked quick); do you think this is more a special case that could benefit from a custom executor?

jimmyjames avatar Jul 07 '25 16:07 jimmyjames