We will now start Streaming Lite and run our Custom Java Adapter. To see what our Custom Java Adapter is inputting, we will subscribe to the isFreezerTemperatureReading
stream of our freezer_monitoring_lite
project.
First, start up the freezer monitoring lite program in PuTTY/SSH
by running:
$STREAMING_HOME/bin/streamingproject --ccx $HOME/freezer_monitoring_lite.ccx --command-port 9230
Open up another PuTTY/SSH
window to run our Custom Java Adapter. To run our adapter, run this command:
java -cp "$HOME/custom_java_adapter/java_adapter_runnable.jar:$HOME/custom_java_adapter/libj/streaming-client.jar" custom_java_adapter.JavaAdapter
If it is successful, you should see this:
Next, we will subscribe to the isFreezerTemperatureReading
stream. The streamingsubscribe
executable comes with the installation of Streaming Lite, and is used to view the contents of any stream in a running project.
Open up a third PuTTY/SSH
window, and run it using the following command. Make sure to replace <host>
with your FQDN
(Fully Qualified Domain Name):
$STREAMING_HOME/bin/streamingsubscribe -s isFreezerTemperatureReading -p <host>:9230/freezer_monitoring_lite
If our Custom Java Adapter is working correctly, you will be able to see the rows being written into our input stream:
For the question below, select the correct answer, and click Validate.