On Wed, 2017-12-06 at 14:38 +0100, Francesco wrote:
> Hi Luca,
> yes sorry: I mean in the case of multiple publishers. In such case
> ZMQ will
> apply fair-dequeueing of the per-publisher queues, right?

Yes, that's correct.

> The messages I publish have a timestamp inside them and I would like
> to
> process, inside my SUBscriber the messages ordered by timestamp, but
> of
> course ZMQ cannot know about that...
> 
> Francesco

Yes you'd have to implement that in your application - but I'm not sure
how well that can scale.

> 2017-12-06 13:40 GMT+01:00 Luca Boccassi <luca.bocca...@gmail.com>:
> 
> > On Wed, 2017-12-06 at 12:55 +0100, Francesco wrote:
> > > Hi all,
> > > As you know when using PUB/SUB model the order of arrival of
> > > messages
> > > at
> > > SUB-side cannot be garantueed and generally speaking, the SUB
> > > will
> > > receive
> > > messages out of order. This is a well known problem, see e.g.:
> > >   https://cloud.google.com/pubsub/docs/ordering
> > > 
> > > My question is: in case in the SUB you need strict time ordering,
> > > are
> > > you
> > > aware of any good C++ implementation of a reordering queue?
> > > 
> > > I used for other purposes moodycamel's queue (
> > > http://moodycamel.com/blog/2013/a-fast-lock-free-queue-for-c++)
> > > which
> > > is
> > > thread-safe but it does not perform time-reordering.
> > > 
> > > Thanks!
> > > 
> > > Francesco
> > 
> > What do you mean exactly? If you mean with multiple publishers
> > writing,
> > or ordering between different subscribers, then yeah it cannot be
> > guaranteed.
> > 
> > But from each individual publisher, to each individual subscriber,
> > the
> > ordering is guaranteed. Messages are written in a queue (first-in
> > first-out), and then given to TCP, and then again received in a
> > queue
> > where the application fetches them from.
> > 
> > --
> > Kind regards,
> > Luca Boccassi
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev@lists.zeromq.org
> > https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> > 
> > 
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev

-- 
Kind regards,
Luca Boccassi

Attachment: signature.asc
Description: This is a digitally signed message part

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

Reply via email to