[zeromq-dev] publish not flushing

Michael Small michaelsmall at me.com
Thu Aug 5 06:03:44 CEST 2010


I have a process which publishes messages like so:

for(int i = 0; i < 100; ++i) {
std::size_t topic_sz = topic.size()-1;
std::size_t obj_sz = sizeof(TestMsg);
zmq::message_t msg(sz);
uint8_t* bytes = reinterpret_cast<uint8_t*>(msg.data());
memcpy(&bytes[0], topic.c_str(), topic_sz); 
memcpy(&bytes[topic_sz], &t, obj_sz);
int r = s.send(msg);
}

Interestingly it seems as if the first message will be received in the client, but the rest aren't until after the loop exits and the zmq::context_t is destroyed.

Is there some flag or method to flush the messages that I'm not aware of?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100805/e94f6bdb/attachment.htm>


More information about the zeromq-dev mailing list