int ctMemphisMQTTPersistenceCreate( pRCESJson request, ppRCESJson result )
Description:
Create a MQTT persistence topic. See "CreatePersistenceTopic" in the MQTT persistence documentation.
HTTP URL: <baseURL>/ctMemphisMQTTPersistenceCreate/
HTTP Verb: POST
Parameters:
{
"mqttPersistence": {
"persistenceTopic": "topic/name", // MQTT persistence topic name
"persistenceTopicMessageFormat": "JSON", // MQTT payload message type
"persistenceTopicThreads": 10, // Number of threads used for
persistence
"dbEngine": 2, // DBEngine identification where
persistence is executed
"database": 3, // Database identification where
persistence is executed
"tableName": "table_name", // Table name where topic is persisted
"tableReplicationReady": TRUE, // Flag indicating if persistence table
is replication ready. Default: TRUE.
"tableAutoTimeStamp": TRUE, // Flag indicating if persistence table
has auto timestamp field. Default: FALSE.
"tableAutoTimeStampIndex": TRUE, // Flag indicating if persistence table
has auto timestamp index. Default: FALSE.
"tableRetentionPeriod": 10, // Number of "tableRetentionUnit"
to be retained
"tableRetentionUnit": "day", // Retention period unit, see
"tableRetentionUnit" for values
"mapOfPropertiesToFields": [
{
"jsonPropertyPath": "prop1", // JSON property name to be mapped
"fieldName": "field1", // Field where property value is stored
"fieldType": "INTEGER" // See MQTT documentation for
MQTT types supported
},
{
"jsonPropertyPath": "prop2", // JSON property name to be mapped
"fieldName": "field2", // Field where property value is stored
"fieldType": "DOUBLE", // See MQTT documentation for MQTT
types supported
"fieldWidth": 8, // Field width
"fieldScale": 2 // Field scale
}
]
}
}
{
"success": true,
"error":
{
"errorCode": 0,
"message": "Success"
},
"id": 3
}
Return: Error code