NATS Visualizer multiplayer
Stop and restart four simulated services and watch what happens to their events. Auth and Inventory use Core pub/sub and lose events while stopped; Orders and Payments use JetStream and catch up. A KV heartbeat drives the health tiles.
recv().via.events.*). Fire-and-forget: if you kill one of these services its simulator stops and any events published while it is offline are gone forever.VIAEVENTS stream captures every message in memory. The durable consumer tracks its last-delivered sequence across subscribe/unsubscribe cycles: a revived subscriber never misses a message.$KV.viahealth.{service} every 2 s. Guaranteed services always heartbeat (only the consumer is paused); best-effort services stop heartbeating when killed. The health grid reads KV age.Coroutine::create()) prevents race conditions.withWorkerNum().via.events.*
auth, inventory
VIAEVENTS
0 msgs
ui-orders, ui-payments
ACK guaranteed
viahealth
heartbeats
via.events.*
0 logged
Actions
kill-orders / kill-payments
Pauses the JetStream durable consumer (unsubscribes from the deliver inbox). Simulator keeps publishing; NATS buffers un-ACKed messages. Health tile stays green: the service is still alive, only the consumer is paused.
kill-auth / kill-inventory
Stops the event simulator entirely. Events are silently dropped: Core pub/sub has no persistence. Health tile flips to DOWN after 8 s of silence.
revive-{service} (×4)
Guaranteed services: re-subscribes to the deliver inbox; JetStream immediately delivers all buffered events in a burst. Best-effort: restarts the simulator and publishes a fresh KV heartbeat.
Views
mission_control.html.twig
Flow diagram from the services through NATS to the browser, service kill/revive cards with delivery-type badges, NATS topology with health tiles, and a live event stream.