Ok, so once ZMQ sends to transport, zmq removes it from its internal queue. Is there a way to know when would ZMQ do that ? Or may be build one ? The customers of my lib want TCP like semantics and I need to tell if the buffer is copied successfully to the kernel.
Any help on this is greatly appreciated. Thanks. DJ On Fri, Jul 27, 2012 at 3:46 PM, Bennie Kloosteman <[email protected]>wrote: > Like most systems ZeroMQ will just send the message to the transport when > the transport has received the message ( eg TCP/IP )it is removed from > ZeroMQ. There are no guarantees it has even been sent , yet alone that the > transport layer on the other side has the message. This is pretty standard > TCP/IP provides no guarantees the other service has received the message ( > only the receiver TCp/IP stack) so you need to code this in your > application logic. > > Also if you are persisting you do not need a light weight system , > persistence is always slow and heavy , killing any performance ( Normally > non persistent messaging systems do at least 10* the messages / second to > persistent ones) . For persistence I would use a queue like MSMQ or the IBM > equivalent . Queues also help in knowing if the other side has received > it. > > Ben > > > > On Sat, Jul 28, 2012 at 2:27 AM, diffuser78 <[email protected]> wrote: > >> Sorry about my ignorance and laziness. I read this on the FAQ page: >> >> >> *How do I determine how many messages are in queue?* >> >> *This isn't possible. At any given time a message may be in the ØMQ >> sender queue, the sender's kernel buffer, on the wire, in the receiver's >> kernel buffer or in the receiver's ØMQ receiver queue. Furthermore, a ØMQ >> socket can bind and/or connect to many peers. Each peer may have different >> performance characteristics and therefore a different queue depth. Any >> "queue depth" number is almost certainly wrong, so rather than provide >> incorrect information the library avoids providing any view into this data. >> * >> I had a related question but not same as above. >> >> When ZMQ sent this message over TCP to the receivier and when receiver >> did a FIN/ACK indicating that it is ACK'ing to the finish of the >> tranmission of byte transfer, it indicates that the transport layer on the >> other end got the message. Does ZMQ keep tab of this ? When does sender ZMQ >> removes this message from its internal buffer. *I am only interested in >> knowing (in YES or NO) whether this message is in sender zmq buffer or not >> *. Is that possible ? If you can point me out, I can create a patch for >> it and send for review. >> >> Any thoughts are greatly appreciated. >> >> DJ >> >> On Fri, Jul 27, 2012 at 11:16 AM, Ian Barber <[email protected]>wrote: >> >>> On Fri, Jul 27, 2012 at 6:26 PM, diffuser78 <[email protected]> >>> wrote: >>> > What I want to know is that, ZMQ might have returned success upon >>> buffering >>> > the message. But what if message is still in the queue and has not been >>> > delivered to the receiver for some reasons (say slow receiver). Is >>> there a >>> > way I can peek into ZMQ queue to find out if my message M that I had >>> sent in >>> > a non blocking way was indeed sent on the wire successfully? My lib >>> needs to >>> > acknowledge to the app if there was an error after some time T for it >>> to >>> > timeout on the message M. >>> >>> It could be lost in the network, or the other side could crash while >>> processing. The best way is to send an acknowledgement back from the >>> receiver (also using ZeroMQ) and use that to determine whether the >>> other side has received and processed it. >>> >>> Ian >>> _______________________________________________ >>> zeromq-dev mailing list >>> [email protected] >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >> >> >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
