[zeromq-dev] ZeroMQ not working well with google protobuf?

Peter Sanders petersanders65 at hotmail.com
Fri Mar 22 12:36:35 CET 2013

Hello People,

I've made a handshake system with two parts: heaven and earth. Earth starts by sending a heartbeat. Heaven receives and replies back with the same heartbeat. If no beat has been received in 2 seconds from either end, both ends take alternative actions while earth continues to send the heartbeat (hoping that heaven will come back). The problem is now, that it worked perfectly fine when I just sent a regular string ('beat'). But once I encoded it using google protocol buffers, earth started giving humongous errors (link to errors). That might indicate that protobuf is making the trouble. But when I set up a simple earth receiver which only receives messages from heaven and not doing anything else (no IOLoop, PeriodicCallback or ZMQStream), it also works perfectly fine.

Would this mean that the combination of ZeroMQ and Protobuf is not a good one? Or am I simply making a mistake which I can't get my head around? If anyone could help me out with this I would be very grateful!

The code I have is as follows:
earth: http://pastebin.com/tvvSZeNRheaven: http://pastebin.com/rtzCsuvg
Messages are encoded using the following google protobuf serialization (link to compiled python encoder):

message heartBeat {
    optional int32 heartBeat = 1;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130322/202e83a4/attachment.htm>

More information about the zeromq-dev mailing list