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

Peter Sanders petersanders65 at hotmail.com
Fri Mar 22 12:46:08 CET 2013


Wait, the links didn't come out well:

link to errors: http://pastebin.com/jX4SFapt
earth.py: http://pastebin.com/tvvSZeNR
heaven.py: http://pastebin.com/rtzCsuvg
compiled protobuf message encoder in python: http://www.hkramer.nl/opslag/infoPack_pb2.py

I hope that works..

From: petersanders65 at hotmail.com
To: zeromq-dev at lists.zeromq.org
Subject: ZeroMQ not working well with google protobuf?
Date: Fri, 22 Mar 2013 12:36:35 +0100




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/059e7b40/attachment.htm>


More information about the zeromq-dev mailing list