[zeromq-dev] protocol design question

Pieter Hintjens ph at imatix.com
Tue Nov 15 21:37:36 CET 2011


On Tue, Nov 15, 2011 at 1:59 PM, Chuck Remes <cremes.devlist at mac.com> wrote:

> For one of the fields (message frames) I need to define a unique sequence number. I decided upon a combination of a 64-bit integer and a 16-byte UUID.
>
> The UUID would uniquely identify each client. The sequence number would uniquely identify each message from that client. When used together, each message from N clients can be uniquely identified.

Sounds fair enough.

> Is it portable to pack them both into the same frame like this? I assume a C user could define a struct to map that frame directly.

Sure, this is a good representation. For clarity you might put the
UUID before the sequence number (it is the more natural order IMO).

Note that you can post Raw RFCs and refine them online. I.e. don't
worry about getting them right up-front.

-Pieter



More information about the zeromq-dev mailing list