Emqx: Message order is not preserved in cluster

Created on 20 Nov 2019  路  5Comments  路  Source: emqx/emqx

Environment

Description

Message order is not preserved between brokers in cluster, when consecutively published to the same topic.
When two clients are connected to the same broker, all messages are received in the order they are sent. However when two clients are connected to two different brokers, not all messages are receieved in the same order they are sent.

It seems like the order of messages is not preserved when routing the messages between brokers.

Enhancement

Most helpful comment

@arnecs-piscada You are right, we only fixed it in v4.0 due to our negligence. We will synchronize the repair to v3.2.6 as soon as possible, thanks for your feedback.

All 5 comments

@arnecs-piscada
EMQ X guarantees the order of messages even in cluster. May you provide more details about how you send and receive?

Related to #3000 ?

By using mosquitto_pub and mosquitto_sub.
We have a cluster of 3 brokers running in kubernetes.

Subscribe to broker emqx-0

mosquitto_sub -h emqx-0 -p 1883 -t test -q 2

Publish messages with a incrementing number in payload to broker emqx-1.

printf "%d\n" {1..5} | mosquitto_pub -h emqx-1 -p 1883 -t test -q 1 -l

Expected output

2
3
4
5

Actual

2
3
5
4

Output from the subscriber shows that the messages is not always received in the same order they got sent. Mulitple client connected to the same broker always receive the messages in the same order. Having a client connected to the third broker may receive the messages in a different order.

@arnecs-piscada You are right, we only fixed it in v4.0 due to our negligence. We will synchronize the repair to v3.2.6 as soon as possible, thanks for your feedback.

@arnecs-piscada You are right, we only fixed it in v4.0 due to our negligence. We will synchronize the repair to v3.2.6 as soon as possible, thanks for your feedback.

Hi @tigercl, how do we know when the repair is synchronized to v3.2.6? Is it done already? Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kenpeter picture kenpeter  路  6Comments

viest picture viest  路  5Comments

jbrzozoski picture jbrzozoski  路  4Comments

franquis picture franquis  路  5Comments

stefano055415 picture stefano055415  路  4Comments