======================================== LiveView MQTT Recovery Publisher Sample ======================================== This StreamBase Studio project has a LiveView table called WellData that is published to via an MQTT message bus. The following components are in this sample: - A LiveView project with a single table called WellData that is published to via an MQTT publisher. The LiveView publisher EventFlow application is called MQTTPub.sbapp. The WellData table is configured with log file recovery. - An independent EventFlow module called MQTTClientPub.sbapp that publishes a stream of simulated data from 28 oil well pumps. As shipped, the adapter-configurations.xml in this sample uses the open Eclipse iot.eclipse.org MQTT sandbox server. Please see [1]http://iot.eclipse.org/sandbox.html for further details about this server. The MQTT publisher and subscribe use a common topic. This topic includes a UUID that is generated the first time the LiveView server starts and is used from then on. The topic is written to, and shared from, a local file called /tmp/MQTTTopic.txt. You can change the location of this file by changing the TOPIC_FILENAME parameter in GetTopic.sbapp. You can reset the topic name by deleting this file. It will be regenerated with a new UUID the next time the LiveView server starts. To run this sample in Studio, you can: - In the LiveView Project Viewer, click the green Run button in the upper right. - Once the LiveView server has started, create a "Run Configuration" for the MQTTClientPub module. In the Run Configuration, you must deselect all configuration files. Notice data being published to the WellData table. You can shut down and terminate the LiveView server and start it back up. The WellData table will recover data from its log files, then unacked messages from MQTT are written until finally the recovery catches up with the real time publish again. To run this sample from the command line outside of Studio, you must: - Package this sample's LiveView fragment project into a fragment archive - Create a separate StreamBase Application project, and set the pom.xml for that project to depend on the fragment archive created in the previous step. - Create a separate StreamBase Application archive file. - Install that archive into a StreamBase Runtime node. - Start the node. These steps are described in more detail in the “Deploy with epadmin” page of the Concepts Overview in the StreamBase documentation. More information is available in the LiveView documentation.