Skip to content

lighthouse-no/demo-mqtt-sub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MQTT Subscriber Example App

A simple proof-of-concept app that subscribes to messages on the public MQTT server at tcp://broker.emqx.io:1883

This app works with in conjunction with a corresponding publisher app.

MQTT Demo Pub/Sub App

Usage

  1. Push this app to Cloud Foundry cf push
  2. Watch the CF logs cf logs mqtt-demo-sub
  3. Start the corresponding publisher app from your local machine

In the mqtt-demo-sub logs, you will see messages similar to the following:

2023-07-26T15:27:39.36+0100 [APP/PROC/WEB/0] OUT rust/mqtt: Hello world! 0
2023-07-26T15:27:39.45+0100 [APP/PROC/WEB/0] OUT rust/test: Hello world! 1
2023-07-26T15:27:39.54+0100 [APP/PROC/WEB/0] OUT rust/mqtt: Hello world! 2
2023-07-26T15:27:39.63+0100 [APP/PROC/WEB/0] OUT rust/test: Hello world! 3
2023-07-26T15:27:39.73+0100 [APP/PROC/WEB/0] OUT rust/mqtt: Hello world! 4

To terminate the subscriber, deleted the deployed app in Cloud Foundry


© 2023 Lighthouse Consulting AS

About

Subscribe to messages on a public MQTT demo server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages