Search code examples
multithreadingsingletonthreadpoolhystrixcommand-pattern

Hystrix Command Objects : new vs singleton


Is it correct to create HystrixCommand object implementations as Singleton? If it does, is it going to hold the thread till it finishes execution and won't create anymore?


Solution

  • No, they are executed only once. They are stateful with input arguments, response value or error and request log. (c) Hystrix github