Thing uses GadgetKeeper message broker to exchange messages.
Communication Protocols: | MQTT, XMPP, STOMP |
---|---|
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 messaging" | |
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 |
MQTT Connection
MQTT Server | api.gadgetkeeper.com |
---|---|
MQTT Port | 1883 |
MQTTS Port | 1884 |
Request Topic | thing.<THING_ID> |
Response Topic | thing.<THING_ID> |
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 GadgetKeeper MQTT server
- Thing subscribes to topic "thing.990fc000c90211e2b5566c626dd90e00", there "990fc000c90211e2b5566c626dd90e00" is its ID
-
GadgetKeeper sends JSON-RPC request message to the topic:
-
Thing receives JSON request message and send a response back to the topic:
-
GadgetKeeper receives the response