sketch2

command
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 12 Imported by: 0

README

Sketch2 - Embedded MQTT Setup

Uses mochi-mqtt/server as the embedded MQTT engine.

This sketch demonstrates:

  • Building an embedded MQTT service with github.com/mochi-mqtt/server/v2
  • Launching the service on TCP port 11883
  • Multiple clients that receive messages from the same topic
  • Single client that sends messages to the topic

No need to set up outside MQTT infrastructure - the entire setup runs within the application.

Run

go run main.go

The embedded service starts on tcp://127.0.0.1:11883 and creates 10 receiving clients plus 1 sending client.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL