[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mosquitto-dev] Publish order of retained messages for wildcard subscriptions
|
Hi Vera,
Currently what you say is correct, but it's not guaranteed and it's
entirely possible it'll change in the future.
Regards,
Roger
On Fri, 22 Jan 2021 at 14:33, Vera Clemens <mail@xxxxxxxxxxxxxxx> wrote:
>
> Hi!
>
> In the following situation:
>
> 1. Retained messages have been published on topics matching xyz/#, e.g.
> xyz, xyz/0, xyz/1, xyz/2
> 2. Client subscribes to xyz/#
>
> In what order will the retained messages be published to the client? Is
> the order guaranteed in any way?
>
> From my tests, it appears the messages on xyz/... are published in
> original publish order, but the message on the top-level topic xyz is
> always published last. Is that correct?
>
> ```
> $ mosquitto_pub -t "test2" -r -m "test"
> $ mosquitto_pub -t "test2/1" -r -m "test"
> $ mosquitto_pub -t "test2/2" -r -m "test"
> $ mosquitto_pub -t "test2/" -r -m "test"
> $ mosquitto_pub -t "test2/0" -r -m "test"
> $ mosquitto_sub -t "test2/#" -v
> test2/1 test
> test2/2 test
> test2/ test
> test2/0 test
> test2 test
> ```
>
> Thanks!
>
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev