A NATS firewall
Protect your real NATS environment. Scan payloads and hold back outliers before messages reach it.
A message-processing sidecar for NATS.
Round readings, suppress repeats, match patterns and publish alerts before messages reach your subscribers. Combine built-in operators into rules with the agent-friendly Patchbay DSL for sensor feeds, market data and other potentially unwieldy message streams.
Runs on macOS, Linux, Raspberry Pi and ESP32.
1 / 8 · Quiet the noise
Use Patchbay to combine built-in forms into a processor tailored to your streams, with a few lines of configuration. Stateful forms keep values between messages for moving averages, deduplication and threshold alerts. Browse all available forms.
Not sure where to start? Patchbays can be written by AI: the patchbay-authoring skill turns Codex and Claude into qualified Patchbay experts. 🤖
(on "sensors.*"
(-> payload-float
(round 1)
(squelch)
(publish! (subject-append "stable"))))Patchbay referenceRound to one decimal place, then publish only when that rounded value changes.
Example values · See real messages
Chain operators with ->, add conditions with when and send results with publish!. Browse the examples · Watch a coding assistant build a patchbay
What you do with monoblok is up to you. Patchbay is a small language, not a fixed feature list, so these are three places to start.
Protect your real NATS environment. Scan payloads and hold back outliers before messages reach it.
Forward the measurements. Leave names and record numbers behind.
Turn raw readings into bars, averages and one alert per crossing.
Publish raw messages to an isolated monoblok instance. Its rules produce clean messages, and export relays only those output subjects to NATS for subscribers.
Use import to read existing NATS subjects into monoblok, then export to send processed results back on separate subjects. Publishers and subscribers stay connected to your cluster.
monoblok is a lightweight broker with processing built in. Connect your NATS clients directly to monoblok.
Written in C with libuv, with rules and cached values held in memory.
Throughput alone cannot capture NATS’ decade-plus of production maturity. Test your own workload to confirm capacity and latency.
Write rules in EDN, YAML or JSON using a rich library of built-in forms.
--validate and --soundcheck provide checks and sample-message dry runs.monoblok complements NATS rather than replacing it.
nats CLI connect unchanged.Download a release binary, use the script below or run the Docker image.
curl -fsSL https://raw.githubusercontent.com/lexvicacom/monoblok/main/scripts/start.sh | bashOr run with Docker
docker run --rm -p 14222:14222 ghcr.io/lexvicacom/monoblok:latest --port 14222