[zeromq-dev] Some suggestions for ZeroMQ
Martin Sustrik
sustrik at 250bpm.com
Mon Jan 23 01:45:41 CET 2012
Hi Victor,
> IMHO, there are some design should be changed.
>
> 1. Add an option to determine whether to buffer data on connecting sockets
>
> I'm not sure the reason why connecting sockets buffer data, but I think
> it's for to sync easily. To make the behavior not so surprising, it's
> better to connect without buffering, namely, create the pipe and
> attached when connection is made.
You are right that current design is asymetric.
The reason it works this way is that most users are seriously annoyed
when they do, for example:
s = zmq_socket (ctx, ZMQ_PUSH);
zmq_connect (s, "tcp://192.168.0.111:5555");
zmq_send (s, "ABC", 3, 0);
and the message is lost. (Note that this would always happen with all
the messages sent immediately after connect.)
> 2. Add an option to determine how to drop messages in HWM state
>
> As what I said, new messages are important in most of cases. It's better
> to have an option to determine to drop new message or old message.
I've tried to specify the algorithm to do this a consistent way here:
http://lists.zeromq.org/pipermail/zeromq-dev/2011-December/014721.html
Thoughts?
Martin
More information about the zeromq-dev
mailing list