v3::sink::send_at_least_once() and message ordering #82
Unanswered
Antiarchitect
asked this question in
Q&A
Replies: 1 comment
-
there are no strong guarantees but messages should be send in enqueue order
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Andrey Voronkov ***@***.***>
Sent: Tuesday, December 21, 2021 6:28:04 AM
To: ntex-rs/ntex-mqtt ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [ntex-rs/ntex-mqtt] v3::sink::send_at_least_once message ordering (Discussion #82)
Suppose I'm receiving messages to be sent to the client from the channel in a loop and there:
loop {
...
rx.recv_async().await {
if sub.qos == QoS::AtMostOnce {
builder.send_at_most_once();
} else {
ntex::rt::spawn(builder.send_at_least_once());
};
}
...
}
Is there any guarantee that messages are sent to the client in the same order as they received from rx or I should maintain the order by waiting ntex::rt::spawn(builder.send_at_least_once()) each time?
—
Reply to this email directly, view it on GitHub<#82>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAESHTWXCRVOOEMWCB2VVY3UR7CZJANCNFSM5KO5MT4Q>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suppose I'm receiving messages to be sent to the client from the channel in a loop and there:
Is there any guarantee that messages are sent to the client in the same order as they received from rx or I should maintain the order by waiting
ntex::rt::spawn(builder.send_at_least_once())
each time?Beta Was this translation helpful? Give feedback.
All reactions