简体   繁体   English

zeromq(zmq)缺少与C ++发布者和python订阅者的消息

[英]zeromq (zmq) missing messages with c++ publisher and python subscriber

I'm not receiving any zeromq messages when using a python subscriber and a c++ publisher. 使用python订阅服务器和c ++发布服务器时,我没有收到任何zeromq消息。

I setup a test case with the zguide. 我使用zguide设置了一个测试用例。
I run taskwork2, taskwork2, tasksink2, taskvent. 我运行taskwork2,taskwork2,tasksink2,taskvent。 tasksink2 is a publisher and taskwork2 is a subscriber. taskink2是发布者,而taskwork2是订阅者。 When running all c++ or all python parties all works well. 当运行所有c ++或所有python主体时,一切运行良好。 When running tasksink2 in c++ and the rest in python, the final KILL message is not received and the taskwork2 tasks never complete. 在c ++中运行taskink2并在python中运行其余任务时,未收到最终的KILL消息,并且taskwork2任务永远不会完成。
When running tasksink2 in python and the rest in c++, all works well. 当在python中运行taskink2并在c ++中运行其余代码时,一切运行良好。 Per the missing message guide, I start taskwork2 before tasksink2. 根据缺少的消息指南,我在taskink2之前启动taskwork2。

I tried creating simple cases with a c++ publisher sending a test message repeatedly, but python subscribers don't receive any messages. 我尝试使用C ++发布者重复发送测试消息来创建简单案例,但是python订阅者没有收到任何消息。

Any suggestions on a fix or debugging methods? 关于修复或调试方法有什么建议吗?

So far I have only tested this on windows. 到目前为止,我仅在Windows上对此进行了测试。

Step No.1: Check ZeroMQ version coherence 步骤1:检查ZeroMQ版本一致性

Test and publish both C++ and Python side ZeroMQ version number outputs 测试并发布C ++和Python端的ZeroMQ版本号输出

# PYTHON SIDE:
from zmq import zmq_version
zmq_version()

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

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