[zeromq-dev] Message deallocating after sending

Negm, Ayman Ayman.Negm at dermalog.com
Thu Apr 30 09:34:59 CEST 2009


Hi,

After sending a message using send(..) the message should be deallocated, as documented in api_thread.hpp(see the code snip bellow).
If I resend the same message once more the buffer is sent but the arrived message size is 0.
There is the method present() which requires to call flush(), which I could use.
But, I don't know if this is the indented behaviour for send(), since in this case
you are sending "useless" data.

The same behaviour is noticed for v0.5 and v0.6

<api_thread.hpp>
   //  Send a message to specified exchange. 0MQ takes responsibility
   //  for deallocating the message. If there are any pending pre-sent
   //  messages, flush them immediately. If 'block' parameter is true
   //  and there are no queues bound to the exchange, execution will be
   //  blocked until a binding is created. Returns true is message was
   //  successfully enqueued, false if it was not send because fo pipe
   //  limits.
   ZMQ_EXPORT bool send (int exchange_, message_t &message_, bool block_ = true);
</api_thread.hpp>


Thanks in advance,
Ayman

________________________________
DERMALOG Identification Systems GmbH * Mittelweg 120, 20148 Hamburg * www.dermalog.com
Company Registration: Amtsgericht Hamburg, HRB 69547 * Gesch?ftsf?hrer/CEO: G?nther Mull
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090430/5ee73e73/attachment.htm>


More information about the zeromq-dev mailing list