IoT Core Lambda sequential event

0

Hi , I am receiving sequential data from IoT device and need to display status data real time on the dashboard. Currently receive MQTT data to IoT Core and push to AppSync mutation through Lambda(triggered by iot rule). Browser client subscribes to AppSync mutation and receives the data.

QUESTION:I need to keep the order of events so that the data will be displayed sequentially . In case of lambda scales, I am not sure if order of the events will be kept for the same topic. Do I need to use FIFO like queue in order to prevent out of order events? Is Lambda(synchronous call) good to use between Iot Core and AppSync? Or can Browser client subscribe to IoT core directly, no AppSync? Thanks

1 Answer
0

Hi Ozy,

in general AWS IoT Core message broker does not guarantee message ordering. In case you want to preserve the message order after messages have been processed by a rule you can ingest the data into a Kinesis Data Stream. Please see also the Real-Time IoT Device Monitoring with Kinesis Data Analytics solution..

You can also subscribe to a topic directly from your browser but you need to keep the quota per connection in mind. When you exceed the quota you can open multiple connections but such an approach is harder to scale than the above mentioned solution.

Cheers,
Philipp

AWS
EXPERT
answered 2 years ago
  • Hi Philipp, "in general AWS IoT Core message broker does not guarantee message ordering", seem like this might be show stopper for me. From the link that you provide with Kinesis, if IoT core does not guarantee the order how Kinesis achiving this, because Iot is the feeding source. Let me be more specific on the case. If I am trying to monitor an elevator and need to mirror the up/down function on the dashboard , It will be problem if I receive floor data like 1 2 [5]34. The animation will jump from 2 to 5 and back to 3. May be I can insert data to DB and query based on timestamp or floor number, but this is extra work and causes delay.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions