commercetools / commercetools/commercetools-sdk-java-v2
Add way to specify executorservice to be used when returning commercetools SDK result
- Vorherrschende Sprache
- Java
- Sterne
- 47
- Forks
- 21
- Ø Merge
- 9 T. 13 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
**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..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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Das Issue nennt keine Dateien, Tests oder Einstiegspunkte; beginne damit, den asynchronen Ergebnispfad des SDK und den in der Anfrage erwähnten Middleware-Ansatz nachzuverfolgen. Lege fest, wie ein konfigurierbarer Executor bereitgestellt wird, und überprüfe, dass die Ergebnisse des SDK konsistent auf ihm fortgesetzt werden, wobei die bestehende thenApplyAsync-Alternative abgedeckt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100