private void ThreadMethod() { logger.Debug("Back sync start"); while (true) { if (isExit) { return; } Thread.Sleep(this.mill); logger.Debug("Sync Thread start sync "); List <SaleOrder> list = service.getUnSyncList(); list.ForEach(l => { MessageSender.getInstance().sendMessage(l); }); logger.Debug("Sync Thread send message count :" + list.Count); } }