Skip to content

code4kunal/golang-mqtt-broker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wattx-Task

Problem Statement

Emulate a heating service in which sensors in a room records temperature and periodically publish readings in a specific format. After receiving the values, openness of the valve is determined and again published.

Solution

A message broker is used to publish and subscribe messages in the IOT environment. Some assumptions are made to emulate the real world scenario.

  • A room consists of 10 sensors.
  • Every sensors randomly publishes the recorded reading attached to a given topic.
  • Every 20 seconds(periodically) a reading is published.
  • Currently, the test scenario allows a total of 4 readings in a single run.

Execution

Set mqtt broker up and running:

$ docker run -d -p 1883:1883 -p 8883:8883 prologic/mosquitto

Set up project

$ git clone https://github.com/code4kunal/golang-task.git
$ cd golang-task
$ go build && ./golang-task 

About

Golang starter for mqtt message broker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages