[zeromq-dev] Is last value caching the only way to send the first message to a subscriber?
ph at imatix.com
Sat Feb 23 12:23:49 CET 2013
You've not explained what your case is but I assume you're trying to
start the publisher and subscriber at the same time? You can try for
instance connecting the pub socket to the sub socket rather than the
other way around. The connecting side can start sending immediately.
In more general cases, the publisher starts much earlier than the
subscribers, which will come and go at arbitrary moments. So you can
use a variety of schemes to recover state, or simply not need it.
Finally, if you want more delivery guarantees you might use other
socket types, e.g. push/pull.
Please do read the Guide, it has lots more explanation on this.
On Sat, Feb 23, 2013 at 2:27 AM, crocket <crockabiscuit at gmail.com> wrote:
> There is no specific use case yet. I was just experimenting with the a PUB
> connected to a SUB in LabVIEW and noticed the problem.
> How do I solve the problem in my case?
> On Sat, Feb 23, 2013 at 10:24 AM, Pieter Hintjens <ph at imatix.com> wrote:
>> Hi Crocket,
>> It's not specifically that the first message is always lost; it's that
>> anything a publisher sends before the subscriber connection is
>> complete will be lost to that subscriber. Depending on the actual use
>> case there are various solutions (or it may not even be a problem).
>> Can you explain your use case?
>> On Sat, Feb 23, 2013 at 2:08 AM, crocket <crockabiscuit at gmail.com> wrote:
>> > According to zguide, the first value sent from a PUB socket is always
>> > lost.
>> > And LVC(last value caching) is presented as a solution.
>> > Is there any other way to successfully send the first message from a PUB
>> > to
>> > a SUB?
>> > _______________________________________________
>> > zeromq-dev mailing list
>> > zeromq-dev at lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
More information about the zeromq-dev