GadgetKeeper and Thing use external MQTT broker to exchange messages.
Communication Protocols: | MQTT |
---|---|
RPC Protocol: | JSON-RPC 2.0 |
How it works: |
|
Constraints: |
|
Connection Settings
Field | Required | Description | Dialog |
---|---|---|---|
Name | x | connection name | |
Protocol | x | select "json-rpc over mqtt" | |
Host | x | MQTT broker host | |
Port | x | MQTT broker port | |
Secure | use MQTTS | ||
Request topic | x | topic to send a command | |
Response topic | x | topic to receive a response | |
Connection, ms | x |
number of milliseconds GadgetKeeper can spent on connection to MQTT broker |
|
Response, ms | x |
number of milliseconds GadgetKeeper will wait for Thing to receive message and send response |
|
Date format | x |
date format representation:
|
|
Description | connection description |
Example Scenario Using MQTT
Given
- Thing has remote method "echo"
- Thing want to be able to handle this method
Workflow
- Thing establishes MQTT connection to the specified MQTT Broker server
- Thing subscribes to the specified request topic
- GadgetKeeper subscribes to the specified response topic
-
GadgetKeeper sends a JSON-RPC request message to the request topic:
-
Thing receives the JSON request message and send a response back to the response topic:
-
GadgetKeeper receives the response and disconnects from MQTT broker