Available

amalgame-nats

NATS Core over raw TCP. Pure-text protocol, 15 verbs.

amc package add nats GitHub ↗ ← Back to the ecosystem

Overview

NATS Core client implemented directly on the text protocol (CONNECT / PUB / SUB / MSG / PING — 15 verbs). No vendored C library. NATS is the simplest and fastest message bus in the industry: pub/sub without persistence, sub-millisecond latency.

Features

  • Pure-text NATS Core protocol
  • Pub/sub with subjects and wildcards (* / >)
  • Request/reply pattern (RPC-style)
  • Queue groups — load balancing across subscribers
  • TLS via amalgame-tls

Example

Minimal usage example — copy-paste runnable after install.

amc package add nats

let nc = NatsClient.Connect("nats://localhost:4222")
nc.Subscribe("orders.*", fn(subj, msg) {
    Console.WriteLine(subj + ": " + msg)
})
nc.Publish("orders.new", "{ id: 42 }")

At a glance

Related packages