Martin,

On Mon, Sep 27, 2010 at 08:35, Martin Sustrik <[email protected]> wrote:

> Pieter,
>
> > In 2.0.7 0MQ asserts when given bad
> > messages; later versions say nothing.  This is why my test last night
> > on 2.0.9 appeared to show the message unchanged after sending.  Hint:
> > don't use XREP for this kind of test...
>
> Can you be more specific? What's a bad message?
>

Trying to send a one-part message via XREP is a 'bad message,' since the
first part is actually a routing prefix, which means there is no real
message to send.


>
> Martin
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>


And Pieter,

You said that zmq_msg_copy doesn't create a resendable copy?

I'm not sure exactly what you mean, but you can definitely (I do) send a
message twice if you do zmq_msg_copy. Here's what I learned: you must send
the *copy* first, because if you send the original first, it can clear the
buffer before the copy asks for the data, but sending the copy first is
safe.

I ran into exactly this issue in my MonitoredQueue device, which is all
about sending messages twice, and it works quite well.

-MinRK
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to