[ 02 · Data · 2026 ]

MQTT: before and after

The line’s stations talk to the MES over MQTT as request and response: they wait for its reply before they carry on, so that wait is cycle time. Every MQTT entry point, reworked one by one: in parallel, indexed, with no wasted queries, cached, and with a route of its own for the heartbeat.

1 · Line · The station waits

Each station, when it finishes, sends its result and waits for the answer before going on: that wait is cycle time.

2 · Communications · Broker and bridges

QoS 1 in the broker and a disk spool in each line bridge: what cannot be delivered is kept and goes out in order when it is back. The heartbeat, by its own route. The panel times every round trip.

3 · MES · Every entry point, reworked

From 10–30 queries per answer to 1–5: what is independent, at once; indexes where they were missing; no repeated queries; what does not change kept in memory (the station, the line, the work order); and requests nobody waits for, cancelled.

4 · Agent · Off this path

The line’s message path does not go through the agent.

My role
Design, development and measurement
When
2026
Where
Barcelona plant
Built with
Node.js, TypeScript, MQTT (QoS 1), PostgreSQL, nginx

The situation

Each station on the line, when it finishes an operation, sends its result over MQTT and waits for the MES’s reply before carrying on: saving a result, closing a serial number, printing a label, fetching the day’s orders. That wait is cycle time.

In March the median was acceptable, the tail was not: one station in twenty waited more than 16 seconds to close a serial number, and the worst of the day waited 55…

Related

  1. 03 2025 Plant: health and restartCapability-based monitoring of the factory’s services, and recovery with nobody touching anything. Plant 3 min, no one involved
  2. 01 2026 Production configuration: from SQL to an LLM agent with MCPFrom SQL that only development could run to screens with validation, and an LLM agent that uses those screens through MCP and proposes drafts. AI 76 saves → 5 clicks

Request an invitation

For a hiring process or a specific job, freelance included. Tell me what it is about: I read it myself and, if it fits, you get in from this same browser or receive a personal link.

The job post, the project or who sent you the link.
The role or the job, in a few lines.