NetbaIoT

Device events in,
business sinks out.

NetbaIoT authenticates and decodes MQTT, framed TCP and UDP uplinks into DeviceEvents, then routes them to confirmed webhook or Business RPC sinks. Business systems own durable data.

Protocol v1MQTT 3.1.1 / 5.0
MSRV 1.88.0v0.6.6

Gateway characteristics

  • No database or local runtime persistence
  • MQTT QoS1 PUBACK means EventAccepted, not business persistence
  • Commands require a live MQTT or TCP session
  • Planned shutdown drains required work in memory; a forced exit loses pending events

Implemented

  • Memory-only gateway: MQTT 3.1.1 and bounded 5.0, framed TCP, and authenticated UDP
  • EventAccepted after auth, codec validation, routing, and atomic required-sink admission
  • Confirmed webhook and Business RPC V4 sinks; V5 event windows are opt-in
  • Live-session commands only; offline devices return DeviceOffline and are not queued
  • Official Rust business client with explicit event ACK after application processing
  • Optional device SDK and support for standard MQTT clients
  • Planned shutdown waits in memory for required sink ACKs
  • Separate device and management listeners, TLS profiles, and CLI

Out of scope

  • Crash-durable or exactly-once delivery; SIGKILL can lose the in-memory accepted window
  • Offline command storage, durable outbox, or runtime message history
  • Device HTTP ingress, MQTT-SN, WebSockets, shared subscriptions, bridge mode, and $SYS
  • A required PostgreSQL or other database; business systems own durable data
  • Automatic client retry of commands; DeviceOffline is a typed terminal result
  • Offline RAM publish queues in the device SDK; disconnected publish is rejected

Device, business, and operator paths.

Devices use MQTT, framed TCP or authenticated UDP. Business systems receive confirmed webhook or Business RPC events; HTTP is reserved for management.

EventAccepted is not business persistence.

A device receipt follows validation, routing and atomic admission to every required sink. Required sinks ACK explicitly. In-memory retries can duplicate the stable event_id, so consumers must be idempotent.

Commands are live-session only.

Commands target connected local MQTT or TCP sessions. Offline devices return DEVICE_OFFLINE; no offline commands are stored. Transport send, device receipt and execution ACK are separate.

Memory-only shutdown and restart.

Planned shutdown closes ingress and waits in memory for required sinks to ACK. An outage keeps the process alive and unready. A forced exit loses pending events; every restart starts with empty runtime and MQTT state.

Questions

Does NetbaIoT need a database?

No. The gateway has no database or runtime state files. Business systems own durable data.

What does MQTT QoS1 PUBACK mean?

It means EventAccepted, not business persistence. Required sink retries may duplicate event_id; consumers must be idempotent.

Are commands stored for offline devices?

No. Commands target currently connected local MQTT or TCP sessions; offline devices return DEVICE_OFFLINE.