How routing works

What the router checks, in the order it checks it, every time a printer goes idle.

Rackrew picks the next job for a printer automatically. This page describes exactly how, so you can predict what it will do rather than guess.

When it runs

Two triggers, either of which is enough:

  • A printer reports that it has gone idle.
  • The ten-second sweep finds an idle printer anyway.

The sweep exists so a missed status message can never strand a printer. The router does not wait on an event that might not arrive.

What it checks, in order

1. Queue order. Sticky entries first, so a multi-plate batch keeps its place across several printers. Then normal jobs. Infinite filler jobs last, so filler never blocks real work.

2. Whether the printer can run the job. Nozzle diameter, any required tags, and filament. For multi-material printers, Rackrew will remap AMS colours across up to 16 slots when slot order doesn't matter, or require an exact match when it does.

3. Filament, by weight. Every job carries the grams its slicer calculated. Rackrew compares that against what the ledger says is left on the loaded spool and skips the printer if the job cannot finish. A nine-hour print does not get to stop at hour eight on an empty reel.

4. The claim. Selecting a job and claiming it are the same database operation — a row-locked SELECT … FOR UPDATE SKIP LOCKED. Two printers that go idle in the same instant cannot both take the same entry.

Where your files go

Your G-code does not travel to Rackrew and back. The bridge on your own network — the Hub, or the agent on a spare machine — uploads directly to the printer over the LAN.

| Link | Carries | Protocol | |---|---|---| | Printer ↔ bridge | G-code, camera, control commands | MQTT 8883 + FTPS 990 (Bambu), HTTP (Moonraker) | | Bridge ↔ Rackrew | Job assignments and status updates | TLS 443, JSON only |

Consequences worth knowing:

  • Printer credentials stay on the bridge. Access codes are pushed to the agent when it connects and are never written to disk in a form the cloud can read back.
  • A dropped internet connection does not stop a print. The bridge keeps driving the printer over the LAN and sends its queued status updates once the link is back.
  • A file is uploaded once. The agent recognises a file already on the printer by content hash and skips the transfer for the next job that needs it.

See also Bambu setup, Moonraker setup and the API reference.