[zeromq-dev] Confirmation of ZMQ_PUB + ZMQ_SWAP intended behavior

Christian Martinez chmar at microsoft.com
Wed Aug 17 23:33:10 CEST 2011

Given the statements from the manual below does ZMQ_SWAP "override" the ZMQ_PUB drop behavior (messages go to disk instead of drop) ? And, is using an identity a necessity for this to work properly?

Manual for ZMQ_PUB states:

When a ZMQ_PUB socket enters an exceptional state due to having reached the high water mark for a subscriber, then any messages that would be sent to the subscriber in question shall instead be dropped until the exceptional state ends. The zmq_send() function shall never block for this socket type.

Manual for ZMQ_SWAP states

ZMQ_SWAP: Set disk offload size
The ZMQ_SWAP option shall set the disk offload (swap) size for the specified socket. A socket which has ZMQ_SWAP set to a non-zero value may exceed it's high water mark; in this case outstanding messages shall be offloaded to storage on disk rather than held in memory.
The value of ZMQ_SWAP defines the maximum size of the swap space in bytes.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110817/f8359b89/attachment.htm>

More information about the zeromq-dev mailing list