Skip to content

This repository contains a simple example of an MQTT producer and consumer implemented in Golang using the popular "paho.mqtt.golang" library. The producer publishes simulated temperature readings, and the consumer subscribes to the topic to receive and display the messages.

Notifications You must be signed in to change notification settings

pcpratheesh/mqtt-publisher-subscriber-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mqtt-publisher-subscriber-golang

This repository contains a simple example of an MQTT publisher and subscriber implemented in Golang using the popular "paho.mqtt.golang" library. The publisher publishes simulated temperature readings, and the subscriber subscribes to the topic to receive and display the messages.

Key Features:

  • MQTT Publisher: Publishes messages to an MQTT broker at regular intervals.
  • MQTT subscriber: Subscribes to the topic and displays received messages.
  • Lightweight: Built with Golang and uses the lightweight MQTT protocol, making it efficient for IoT and M2M applications.

Usage:

  1. Clone the repository: git clone https://github.com/pcpratheesh/mqtt-publisher-subscriber-golang
  2. Make sure you have Golang installed on your system.
  3. Install the required dependencies: go get -u github.com/eclipse/paho.mqtt.golang
  4. Run the MQTT publisher: go run publisher.go
  5. Run the MQTT subscriber: go run subscriber.go

About

This repository contains a simple example of an MQTT producer and consumer implemented in Golang using the popular "paho.mqtt.golang" library. The producer publishes simulated temperature readings, and the consumer subscribes to the topic to receive and display the messages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages