code: func (h *HandlerService) Dispatch(thread int) {
  	// TODO: This timer is being stopped multiple times, it probably doesn't need to be stopped here
  	defer timer.GlobalTicker.Stop()
  
  	for {
  		// Calls to remote servers block calls to local server
  		select {
  		case lm := <-h.chLocalProcess:
  			metrics.ReportMessageProcessDelayFromCtx(lm.ctx, h.metricsReporters, "local")
  			h.localProcess(lm.ctx, lm.agent, lm.route, lm.msg)
  
  		case rm := <-h.chRemoteProcess:
  			metrics.ReportMessageProcessDelayFromCtx(rm.ctx, h.metricsReporters, "remote")
  			h.remoteService.remoteProcess(rm.ctx, nil, rm.agent, rm.route, rm.msg)
  
  		case <-timer.GlobalTicker.C: // execute cron task
  			timer.Cron()
  
  		case t := <-timer.Manager.ChCreatedTimer: // new Timers
  			timer.AddTimer(t)
  
  		case id := <-timer.Manager.ChClosingTimer: // closing Timers
  			timer.RemoveTimer(id)
  		}
  	}
  }
docs: // Dispatch message to corresponding logic handler