Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Golang starter for mqtt message broker

NotificationsYou must be signed in to change notification settings

code4kunal/golang-mqtt-broker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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


[8]ページ先頭

©2009-2025 Movatter.jp