FoundryNet / Error codes / MQTT / Sparkplug B Sparkplug seq out of order
MQTT / Sparkplug B error code

Sparkplug seq out of order — Sequence number gap in the Sparkplug stream

Every Sparkplug message carries a seq that increments 0-255 and wraps. A gap means a message was lost, and the host can no longer trust its state model for that node.

Start free MQTT / Sparkplug B → canonical

Diagnosis

When you hit this


Resolution

How to fix it

  1. Publish at QoS 1
    Sparkplug's state model assumes delivery. QoS 0 makes gaps routine rather than exceptional.
  2. Rebirth on a detected gap
    The correct response is to request a rebirth and rebuild state, not to interpolate across the gap.
  3. Check for duplicate node ids
    Interleaved sequences from two publishers look exactly like packet loss until you compare their payloads.

Normalization

What Forge does about it

This is a transport failure, so there is nothing for Forge to normalize: the reading never arrives. What Forge does is refuse to let the gap look like good data. The read-time dropout check flags a field that fell to zero and recovered as a communication glitch rather than a real measurement, and the stuck-sensor check fires when a value repeats for 20 consecutive readings — which is what a cached or last-known value looks like after a link drops. Forge does not retry or reconnect for you; that is your client's or your gateway's job.


Connect

Normalize MQTT / Sparkplug B telemetry

One MCP endpoint serves every protocol adapter. 16,908 curated mappings, 366 canonical fields.

# normalize telemetry from MQTT / Sparkplug B — and 13 other protocols
claude mcp add --transport http forge https://mcp.foundrynet.io/mcp \
  --header 'Authorization: Bearer YOUR_FORGE_KEY'
✓ forge connected — 32 tools available

Related

Keep reading

Other MQTT / Sparkplug B codes: CONNACK 1 CONNACK 2 CONNACK 3 CONNACK 5 Sparkplug NDATA before NBIRTH

Equipment that speaks MQTT / Sparkplug B: MiR (Mobile Industrial Robots) Chemical process Food & beverage process Pharma process (GMP) OTTO Motors Geek+ (Geekplus) Locus Robotics Omron AMR (LD/HD) Trumpf

MQTT / Sparkplug B protocol hub

Other protocols: Modbus OPC UA FANUC FOCAS EtherNet/IP PROFINET / S7 BACnet/IP J1939 (CAN) MTConnect ROS 2 (DDS) SNMP MAVLink HTTP / REST CSV ingest

All error codes · All OEMs · All protocols

Industrial AI fails at the data layer. The Machine Agent explains why, weekly. Read it →
Get the thesis behind this infrastructure — The Machine Agent, weekly.