MQTT Protocol
Bowire discovers MQTT topics by connecting to a broker, subscribing to # for a short window (~3 seconds), and collecting every topic that publishes at least one message.
Setup
dotnet add package Kuestenlogik.Bowire.Protocol.Mqtt
Standalone
bowire --url mqtt://localhost:1883
Embedded
app.MapBowire(options =>
{
options.ServerUrls.Add("mqtt://localhost:1883");
});
Discovery
Topics are grouped by their first path segment:
sensors/temperatureandsensors/humiditybecome thesensorsservicehome/lights/kitchenbecomes thehomeservice- Single-segment topics go into
(root)
Each topic surfaces as two methods:
- Subscribe (ServerStreaming) -- listen for messages on the topic
- Publish (Unary) -- send a message to the topic
Payload Handling
MQTT payloads are binary. Bowire tries three strategies:
- JSON -- parsed and pretty-printed
- UTF-8 text -- displayed as plain text
- Binary -- hex dump with byte count
Input Fields
- payload -- message content (JSON or text)
- qos -- Quality of Service (0 = AtMostOnce, 1 = AtLeastOnce, 2 = ExactlyOnce)
- retain -- whether the broker should retain the message
Broker URL Formats
mqtt://host:1883(standard)mqtts://host:8883(TLS)tcp://host:1883host:1883(scheme optional)