简体   繁体   English

ZeroMQ多个TCP连接

[英]ZeroMQ Multiple TCP Connections

I am currently using ZMQ to publish messages between a back-end server and a front-end web server. 我目前正在使用ZMQ在后端服务器和前端Web服务器之间发布消息。 Sometimes the front-end doesn't appear to receive the messages I am sending. 有时前端似乎没有收到我发送的消息。

Doing a quick netstat I can see the following: 快速进行netstat我可以看到以下内容:

  TCP    169.###.##.###:5557    169.###.##.###:53846   ESTABLISHED
  TCP    169.###.##.###:5557    169.###.##.###:53847   ESTABLISHED
  TCP    169.###.##.###:5557    169.###.##.###:53850   ESTABLISHED
  TCP    169.###.##.###:5557    169.###.##.###:53893   ESTABLISHED
  TCP    169.###.##.###:5557    169.###.##.###:53894   ESTABLISHED
  TCP    169.###.##.###:53846   169.###.##.###:5557    ESTABLISHED
  TCP    169.###.##.###:53847   169.###.##.###:5557    ESTABLISHED
  TCP    169.###.##.###:53850   169.###.##.###:5557    ESTABLISHED
  TCP    169.###.##.###:53893   169.###.##.###:5557    ESTABLISHED
  TCP    169.###.##.###:53894   169.###.##.###:5557    ESTABLISHED

I am running everything from localhost and this to me doesn't look so great as my subscriber has multiple connections to the same socket. 我正在运行从本地主机开始的所有内容,这对我来说看起来并不好,因为我的订户具有到同一套接字的多个连接。 Could someone confirm whether this is an issue or not? 有人可以确认这是否是问题吗? I have some code on my frontend that calls disconnect() but this doesn't seem to have made a difference to the number of open connections. 我的前端有一些代码可以调用disconnect(),但这似乎对打开的连接数没有影响。

我的第一个想法是您的前端泄漏了套接字引用,实际上您的后端有5个套接字开放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM