ditto-clients icon indicating copy to clipboard operation
ditto-clients copied to clipboard

Java client: Let user configure all thread pools

Open yufei-cai opened this issue 3 years ago • 0 comments

Ditto java client 1.1.2 allocates and shuts down its own thread pools, which lead to performance problems when many instances of the java client run in the same JVM. It would be better to let the user provide every ExecutorService the client uses so that the threads are shared across all instances.

The client should not shutdown any user-provided ExecutorService when destroyed. Instead, it should cancel tasks it scheduled and refrain from submitting new tasks. For example, Retry won't be able to rely on the client terminating its executor service and must become aware when its owning client was destroyed.

yufei-cai avatar Jul 15 '20 13:07 yufei-cai