MQTT
The MQTT connector allows connection to MQTT’s message bus on a real-time streaming basis. Specifically, the connector allows Panopticon Designer (Desktop) to subscribe to FIX, JSON, Text or XML based messages that are published on particular topics. The data format itself is arbitrary, and as a consequence, the connection includes the message definition.
Using MQTT
-
When creating a new data table, select MQTT from the Connect to data dialog. The MQTT Connection dialog displays.
-
Enter or set the following:
-
-
Connection Details including the Broker URL (Default is tcp://localhost. NOTE: Currently, only the TCP scheme is supported.), User Name, and Password
-
Topic
-
-
Select any from the following Message Types:
-
-
Fix
-
JSON
-
Text
-
If Text is selected, confirm the Decimal Separator, Text Qualifier, Column Delimiter, and if the first row of the message include column headings.
-
-
-
XML
-
-
The schema of the source file is then defined by clicking the Generate Columns… button.
This populates the list of columns, with the data type found from inspecting the first ‘n’ rows of the files.
-
Click Add Column to add columns to the MQTT connection that represent sections of the XML/JSON/FIX message.
-
Enter or select the following:
-
-
Name
-
-
-
XPath/JsonPath/Fix Tag/Column Index (for example, price/@stock)
-
-
-
Type (Numeric, Text or Date/Time)
-
-
-
Date/Time format when the Data Type is Time
-
NOTE:
To parse and format times with higher than millisecond precision, the format string needs to end with a period followed by sequence of lower case Fs. There can be no additional characters following them.
For example: yyyy-MM-dd HH:mm:ss.ffffff
-
-
Enabled (determines whether the message field should be processed)
-
Filter (defined parameters that can be used as Filter)
-
NOTE: The Filter option is only available for JSON, Text and XML Message types
Fix
JSON
Text
XML
You can also opt to click to delete a column in the list.
-
You can opt to save the columns definition into an XML format by clicking the Save button. The saved XML files are placed in …\Public\Public Documents\Datawatch Desktop\Column Schemas.
-
Click Load to load the column schema.
-
The time zone of input parameters and output data is by default unchanged. Changing the time zone is supported through the Timezone list box, based on the assumption that data is stored in UTC time and outputs are presented in the selected time zone.
-
Expand Real-Time Settings.
Refer to Defining Real-Time Settings for more information.
-
Click OK to confirm the selection and retrieve the record set into Panopticon Designer (Desktop).
Initially, there is no data displayed in the Data Source Preview section of the Edit Data Table window.
Click the Start Preview button to display the data and refresh the values depending on the defined Refresh Period.