eclipse-ditto/ditto-clients

Java client: Let user configure all thread pools

yufei-cai opened this issue · 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.