code: public void addDispatcher(String dispatcherId, int threadsCount) {
          synchronized (dispatchers) {
              if (dispatchers.containsKey(dispatcherId)) {
                  return;
              }
  
              ActorDispatcher dispatcher = new ActorDispatcher(dispatcherId, ThreadPriority.LOW, this,
                      Runtime.isSingleThread() ? 1 : threadsCount);
  
              dispatchers.put(dispatcherId, dispatcher);
          }
      }
docs: Adding dispatcher with specific threads count
  
  @param dispatcherId dispatcher id
  @param threadsCount threads count