-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
receiving messages from PyZMQ #29
Comments
I think you are building upon an example, don't you? Because nzmqt itself does not restrict message topics to a certain pattern.
|
@FaisalZ We are using nzmqt and PyZMQ in Machinekit without problems: EDIT: We are using XPUB on the server side to get noticed when someone subscribe. To encode message we use Google Protocol Buffers. |
Yes I used your PUB/SUB example as reference. How do you then subscribe to to a topic from a python server, that does not follow the mentioned message pattern of the example? |
@FaisalZ nzmqt returns a list of QByteArrays containing the message parts. The first one is usually the topic, see my example above. https://github.com/strahlex/QtQuickVcp/blob/master/src/application/qapplicationstatus.cpp#L222 |
Thanks for the comments. I got it working now. The "problem" was indeed that I thought the topic was not included in the normal message. |
I am trying to use the PUB/SUB pattern between a PyZMQ (python binding of zeroMQ) and nzmqt.
But I am not able to subscribe to messages comming from PyZMQ since the string format of the messages differ.
PyZMQ message: "topic message"
nzmqt: "MSG[topic: message]"
Is there a workaround for this or is it simply impossible to let PyZMQ and nzmqt talk to each other via PUB/SUB?
The text was updated successfully, but these errors were encountered: