[zeromq-dev] zmq::socket_t::send blocking

Jens Auer jens.auer at betaversion.net
Fri Jan 20 21:27:46 CET 2017


Hi,

 

quoting the manual from the link in Colin’s answer:

When a ZMQ_PUSH socket enters the mute state due to having reached the high water mark for all downstream nodes, or if there are no downstream nodes at all, then any zmq_send(3) operations on the socket shall block until the mute state ends or at least one downstream node becomes available for sending; messages are not discarded.

 

Best wishes,

Jens

 

Von: zeromq-dev [mailto:zeromq-dev-bounces at lists.zeromq.org] Im Auftrag von Alexandre Quessy
Gesendet: Freitag, 20. Januar 2017 20:00
An: ZeroMQ development list
Betreff: Re: [zeromq-dev] zmq::socket_t::send blocking

 

Hi,

 

 

ALEXANDRE QUESSY
Consultant software

 
D-BOX Technologies Inc. | A. 2172 de la Province, Longueuil, QC J4G 1R7 CANADA | T. 450-442-3003 | W.  <http://www.d-box.com> d-box.com

De : zeromq-dev [mailto:zeromq-dev-bounces at lists.zeromq.org] De la part de Colin Ingarfield
Envoyé : 20 janvier 2017 12:04
À : ZeroMQ development list <zeromq-dev at lists.zeromq.org>
Objet : Re: [zeromq-dev] zmq::socket_t::send blocking

 

It depends on the type of socket and whether it has reached its HWM.  Some types of socket will block, others will drop the message, others could enqueue it and return immediately.

The behavior for each type of socket is documented here: http://api.zeromq.org/4-0:zmq-socket

Thank you for your answer!

The socket is a inproc:// ZMQ_PUSH socket.

Will that block until the message is sent, if I don’t provide the ZMQ_DONTWAIT option?

Thanks!

 

On 1/20/17 11:00 AM, Alexandre Quessy wrote:

Hi

zmq::socket_t::send() - Is that blocking by default?

I need it to be blocking. (wait for the data to be sent before continuing)

 

If I set the flag ZMQ_DONTWAIT (formerly ZMQ_NOBLOCK) it should be non-blocking. So if I don’t set it, it should block?

Thank you,

 

ALEXANDRE QUESSY
Consultant software

 
D-BOX Technologies Inc. | A. 2172 de la Province, Longueuil, QC J4G 1R7 CANADA | T. 450-442-3003 | W.  <http://www.d-box.com> d-box.com

AVIS : Ce courriel contient des renseignements confidentiels. Si vous n'êtes pas le véritable destinataire, la diffusion ou l'usage de ce courriel, des renseignements qu'il contient ou des documents qui lui sont joints pourrait être illégal. Il est donc strictement interdit de les diffuser ou de les utiliser. Si vous avez reçu ce courriel par erreur, nous vous saurions gré d’en aviser l'expéditeur immédiatement et de le supprimer sans le lire, l'imprimer, le sauvegarder ou le diffuser. Nous vous remercions de votre aimable collaboration.
 
NOTICE: This e-mail contains confidential information. If you are not the intended recipient, any disclosure or other use of this e-mail or the information contained herein or attached hereto may be unlawful and is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately and delete this e-mail without reading, printing, copying or forwarding it to anyone. Thank you for your kind cooperation.





_______________________________________________
zeromq-dev mailing list
zeromq-dev at lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

 

  _____  

E-Mail ist virenfrei.
Von AVG überprüft - www.avg.com <http://www.avg.com/email-signature> 
Version: 2016.0.7998 / Virendatenbank: 4749/13800 - Ausgabedatum: 19.01.2017 

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


More information about the zeromq-dev mailing list