[zeromq-dev] ZeroMQ not working well with google protobuf?
Pieter Hintjens
ph at imatix.com
Fri Mar 22 13:07:59 CET 2013
Peter,
Plenty of people use PB and ZMQ together so it's a problem in your
code. Possibly you're getting something wrong with the ZMQ message
lifecycle, i.e. deallocating memory that's not yet been sent, or such.
-Pieter
On Fri, Mar 22, 2013 at 12:36 PM, Peter Sanders
<petersanders65 at hotmail.com> wrote:
> 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/tvvSZeNR
> heaven: http://pastebin.com/rtzCsuvg
>
>
> Messages are encoded using the following google protobuf serialization (link
> to compiled python encoder):
>
>
> message heartBeat {
>
> optional int32 heartBeat = 1;
>
> }
>
>
>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
More information about the zeromq-dev
mailing list