- 新しい順
- 投票が多い順
- コメントが多い順
Hi Ozy, the solution depends on how long your consumer is willing to wait for out-of-order messages. E.g in your elevator example, if your elevator moves from floor 1 to 5 and your consumer receives events 1,2,3,5 .... 1h ... 4. Are you ok to wait for 1h before message 4 is unstuck and continue processing message 5? I advise to develop a consumer that can handle out-of-order messages, it makes the solution more robust.
That said, if you use a QoS1 on your client and the events are spaced (in the elevator example several seconds), the chance to get a message out-of-order from one elevator are very low. And if you add some kind of sequence number to the message payload {floor:one , seq:100} , {floor:two, seq:101},{floor:three, seq:102},{floor:five, seq:104}
on the device side, you can detect an out-of-order message at the consumer side and trigger exception logic.
関連するコンテンツ
- 質問済み 1年前
- AWS公式更新しました 10ヶ月前
- AWS公式更新しました 1年前
- AWS公式更新しました 2年前
Jan_B, thanks for the explanation and no 1h even 10 sec delay is not acceptable. I have same kind of solution in mind to cover the unordered message as you explained perfectly(message is going to be QoS1 and will have timestamp and sequence number). Now I should either go with some custom handling : this depends on how often this problem will happen, is it %1 or less or %10 or more. Because I will have many moving targets and real time is very crucial. Or I can go with streaming to from device directly and get everything in order. I do have a question on the broker message delivery to subscriber but will ask that as separate question to keep the scope here, thank you for your time
And thank you for explanation instead of just copy/pasting the document link :) AWS should know when we ask question here we already know where to find these docs, question is when we have done all these and need some experts idea instead of being broker to documents :)
Hi, @Jan_B
it's been 2 years but Is it still the same, Or does AWS has introduce anything that can guarantee Message Ordering ?