0
votes

Device can send message to the AWS IoT rules engine either via MQTT, HTTP or basic ingest. Rules engine uses SQL query to listen on topic and selects the data when topic matching the FROM clause arrives.

Code to send MQTT message:

device.publish('topic/subtopic, payload)

Code to send message via basic ingest is:

device.publish('aws/rules/topic/subtopic, payload)

URL to send message via HTTP POST is:

https://IoT_data_endpoint/topics/url_encoded_topic_name?qos=1

MQTT involves broker (pub/sub). So message sent to topic via MQTT will reach all subscribers. Similarly message sent via HTTP will also reach to all subscribers. Where as basic ingest bypasses the broker, thus saving cost and also since broker is not involved the message will not reach any subscribers. Have I understood this correctly?

1

1 Answers

1
votes

Where as basic ingest bypasses the broker, thus saving cost and also since broker is not involved the message will not reach any subscribers. Have I understood this correctly?

Correct - MQTT subscribers will not receive messages that are sent using basic ingest as the broker is bypassed.

From the documentation at https://docs.aws.amazon.com/iot/latest/developerguide/iot-basic-ingest.html

Basic Ingest optimizes data flow by removing the publish/subscribe message broker from the ingestion path

And the "Designing MQTT Topics for AWS IoT" whitepaper at https://d1.awsstatic.com/whitepapers/Designing_MQTT_Topics_for_AWS_IoT_Core.pdf

Basic Ingest enables you to send data to only cloud services through the Rules Engine.

MQTT clients cannot subscribe to the Basic Ingest reserved topics:

Your devices and rules cannot subscribe to Basic Ingest reserved topics

See https://docs.aws.amazon.com/iot/latest/developerguide/iot-basic-ingest.html