[IoT Core] Duplicate messages from topic forwarding rule

0

Hi,

I have created a topic forwarding rule in AWS IoT Core using this rule.

SELECT * from 'data/device01' WHERE temperature > 35

This rule forwards messages to the topic 'data/alarms'. I used QoS 0.

I observed duplicate messages like this from the subscription of 'data/alarms'

data/alarms
August 05, 2020, 14:36:01 (UTC+0900)
Export
Hide
{
  "device": "device02",
  "temperature": 35.02,
  "brightness": 12,
  "humidity": 87,
  "time": "2020.08.05 07:36:01"
}
data/alarms
August 05, 2020, 14:36:01 (UTC+0900)
Export
Hide
{
  "device": "device02",
  "temperature": 35.02,
  "brightness": 12,
  "humidity": 87,
  "time": "2020.08.05 07:36:01"
}

Interesting part is where sometimes there are duplicates and sometimes not.

Question: Is this expected behavior of IoT Core?

Thanks,

profile pictureAWS
질문됨 4년 전965회 조회
2개 답변
0
수락된 답변

The AWS IoT Core message broker defines MQTT Quality of Service level zero like so:

In AWS IoT Core, subscribing to a topic with QoS level 0 means that a message is delivered zero or more times. A message might be delivered more than once. Messages delivered more than once might be sent with a different packet ID.

https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html

AWS
Sounavo
답변함 4년 전
profile picture
전문가
검토됨 16일 전
0

I am having the same issue, was there a fix or a rule that can filter these out while sending? using QOS at 0.

답변함 5달 전
  • Maybe there is a new solution since it has been 3 years. At that time, after some research, the best solution was to use IoT Core -> IoT Rules -> Lambda -> DynamoDB -> DynamoDB Streams to filter out the duplicate messages. Now it seems we can use IoT Rules -> DynamoDB without Lambda. Please thumb up on this so that the AWS IoT Core service engineering team can be aware that people need this de-duplication feature.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인