Skip to content

Commit 1e70df7

Browse files
committed
fix: 集群转发消息能力调通
1 parent 5cb74d0 commit 1e70df7

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

Cyaim.WebSocketServer/Cluster/Cyaim.WebSocketServer.Cluster.Hybrid/HybridClusterTransport.cs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -806,36 +806,6 @@ private async Task<bool> HandleMessageAsync(byte[] body, MessageProperties prope
806806
// If ToNodeId is set, only the target node should process it
807807
// 如果 ToNodeId 为 null,这是广播消息 - 所有节点都应该处理
808808
// 如果 ToNodeId 已设置,只有目标节点应该处理
809-
810-
// #region agent log
811-
try
812-
{
813-
var logData = new
814-
{
815-
location = "HybridClusterTransport.cs:502",
816-
message = "Checking if message is for this node",
817-
data = new
818-
{
819-
messageType = message.Type.ToString(),
820-
fromNodeId = message.FromNodeId,
821-
toNodeId = message.ToNodeId ?? "null",
822-
messageId = message.MessageId,
823-
currentNodeId = _nodeId,
824-
isToNodeIdEmpty = string.IsNullOrEmpty(message.ToNodeId),
825-
isToNodeIdMatch = message.ToNodeId == _nodeId,
826-
willIgnore = !string.IsNullOrEmpty(message.ToNodeId) && message.ToNodeId != _nodeId
827-
},
828-
timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
829-
sessionId = "debug-session",
830-
runId = "run1",
831-
hypothesisId = "B"
832-
};
833-
var logJson = JsonSerializer.Serialize(logData);
834-
System.IO.File.AppendAllText(@"e:\OneDrive\Work\WorkSpaces\.cursor\debug.log", logJson + Environment.NewLine);
835-
}
836-
catch { }
837-
// #endregion
838-
839809
if (!string.IsNullOrEmpty(message.ToNodeId) && message.ToNodeId != _nodeId)
840810
{
841811
// This message is for another node, ignore it / 此消息是发送给其他节点的,忽略它
@@ -845,9 +815,6 @@ private async Task<bool> HandleMessageAsync(byte[] body, MessageProperties prope
845815
return true; // Ack to remove from queue / 确认以从队列中移除
846816
}
847817

848-
// 消息去重逻辑已移除 - 按用户要求移除过滤相同消息ID的逻辑
849-
// Message deduplication logic removed - removed filtering of messages with same ID as per user request
850-
851818
// Trigger message received event / 触发消息接收事件
852819
_logger.LogWarning($"[HybridClusterTransport] 触发消息接收事件 - MessageType: {message.Type}, FromNodeId: {message.FromNodeId}, ToNodeId: {message.ToNodeId}, MessageId: {message.MessageId}, CurrentNodeId: {_nodeId}");
853820

0 commit comments

Comments
 (0)