[zeromq-dev] multi-part messages
Chuck Remes
cremes.devlist at mac.com
Tue Mar 29 22:51:33 CEST 2011
On Mar 29, 2011, at 3:46 PM, Andrew Hume wrote:
> i've always wante dto know why people bother with multipart messages.
> is there a size limit somewhere?
It is a convenient way to logically decompose application-level messages.
I use multi-part messages for pub/sub scenarios. The topic is published in the first part while the body of the data comes in a second part. The benefit here is that the topic is a plain byte-array while the body is almost always serialized using another library like json, msgpack, etc. If both bits of information were in the same message part, my application would need to do the work to separate them before I could deserialize the body.
As it is, the 0mq library does that separation work for me.
cr
More information about the zeromq-dev
mailing list