|
@ -29,7 +29,7 @@ func (mh *MsgHandle)SendMsgToTaskQueue(request ziface.IRequest) { |
|
|
|
|
|
|
|
|
//得到需要处理此条连接的workerID
|
|
|
//得到需要处理此条连接的workerID
|
|
|
workerID := request.GetConnection().GetConnID() % mh.WorkerPoolSize |
|
|
workerID := request.GetConnection().GetConnID() % mh.WorkerPoolSize |
|
|
fmt.Println("Add ConnID=", request.GetConnection().GetConnID()," request msgID=", request.GetMsgID(), "to workerID=", workerID) |
|
|
|
|
|
|
|
|
//fmt.Println("Add ConnID=", request.GetConnection().GetConnID()," request msgID=", request.GetMsgID(), "to workerID=", workerID)
|
|
|
//将请求消息发送给任务队列
|
|
|
//将请求消息发送给任务队列
|
|
|
mh.TaskQueue[workerID] <- request |
|
|
mh.TaskQueue[workerID] <- request |
|
|
} |
|
|
} |
|
|