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? 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 2017-12-06 13:40 GMT+01:00 Luca Boccassi <[email protected]>: > 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 > [email protected] > https://lists.zeromq.org/mailman/listinfo/zeromq-dev > >
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
