code: void invoke(ClientType clientType) {
          try {
              LOGGER.info("Starting service.");
  
              ExecutorService service = ClientServiceFactory.startClientService(_system, clientType, _jobCounter);
  
              LOGGER.info("Service started.");
  
              Thread currentThread = Thread.currentThread();
  
              while (!currentThread.isInterrupted()) {
                  try {
                      Thread.sleep(500);
                  } catch (InterruptedException ex) {
                      currentThread.interrupt();
                      break;
                  }
              }
              LOGGER.info("Stopping service.");
              service.shutdownNow();
              try {
                  if (!service.awaitTermination(60000, TimeUnit.MILLISECONDS)) {
                      LOGGER.warn("Shutdown timed out after 60 seconds.  Exiting.");
                  }
              } catch (InterruptedException iex) {
                  LOGGER.warn("Forcing shutdown.");
              }
              LOGGER.info("Service stopped.");
          } catch (Exception ex) {
              throw new SystemException("There was a problem invoking the committer.", ex);
          } finally {
              if (_system != null) {
                  _system.stop();
              }
              LOGGER.info("Finished");
          } // end try-catch-finally
      }
docs: This method creates multiple threads to dequeue messages from message queue and push into TSDB. One thread is created for every type. Depending on
  message queue connection count, multiple threads may be created for Metric type
  
  @param   clientType  The type of client to invoke.
  
  @throws  SystemException  if an error occurs