You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Modern async Java applications need control on which Threadpool which tasks are running.
Currently, by default, all responses returning from commercetools SDK will continue running in a thread managed by a threadpool from the SDK.
Describe the solution you'd like
Add a way (potentially via Middleware?) to automatically return from any call to commercetools SDK running on a thread from a configurable threadpool AKA Executor
Describe alternatives you've considered
Alternatively, we could manually do:
ctApi.<omitted>.execute().thenApplyAsync(e -> e, myExecutorService);
on each call to commercetools. However, this would clutter the code and can be easily forgotten. Same for any explicit decorator that would be needed.
The text was updated successfully, but these errors were encountered:
As some middlewares use also executors e.g. RetryMiddleware or QueueMiddleware you will have to configure there the executor too (available in the builder since 8.10.0).
FYI: In the more recent versions the Client & ApiRootBuilders have methods which allow to specify the ExecutorService to be used for each of the middlewares and handlers.
Still checking if a central defined executor may be useful
Is your feature request related to a problem? Please describe.
Modern async Java applications need control on which Threadpool which tasks are running.
Currently, by default, all responses returning from commercetools SDK will continue running in a thread managed by a threadpool from the SDK.
Describe the solution you'd like
Add a way (potentially via Middleware?) to automatically return from any call to commercetools SDK running on a thread from a configurable threadpool AKA Executor
Describe alternatives you've considered
Alternatively, we could manually do:
ctApi.<omitted>.execute().thenApplyAsync(e -> e, myExecutorService);
on each call to commercetools. However, this would clutter the code and can be easily forgotten. Same for any explicit decorator that would be needed.
The text was updated successfully, but these errors were encountered: