A3S Event
A3S Event
Provider-agnostic event bus with schema validation, encryption, dead letter queues, and observability
A3S Event
A3S Event is a provider-agnostic event system for Rust. All backends implement the EventProvider trait — swap between NATS JetStream and in-memory without changing application code.
Feature Flags
All optional modules are behind feature gates. The minimal core compiles with zero optional dependencies.
Prop
Type
# Full (default)
a3s-event = "0.3"
# Minimal core only
a3s-event = { version = "0.3", default-features = false }
# Pick what you need
a3s-event = { version = "0.3", default-features = false, features = ["nats"] }Architecture
┌──────────────────────────────────────────────────────────┐
│ EventBus │
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │
│ │ SchemaReg │ │ Encryptor │ │ DLQ Handler │ │
│ │ validate() │ │ AES-256-GCM │ │ MemoryDlq │ │
│ └──────┬──────┘ └──────┬───────┘ └──────┬────────┘ │
│ │ │ │ │
│ └────── publish ─┴── subscribe ─────┘ │
│ │ │
│ ┌────────────────────┴────────────────────────────┐ │
│ │ EventProvider (trait) │ │
│ │ publish · subscribe · durable · history · ack │ │
│ └──────────────┬──────────────────┬───────────────┘ │
│ │ │ │
│ ┌──────────────┴───┐ ┌──────────┴──────────┐ │
│ │ MemoryProvider │ │ NatsProvider │ │
│ │ tokio::broadcast │ │ JetStream │ │
│ │ zero deps │ │ durable subs │ │
│ └──────────────────┘ └─────────────────────┘ │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ StateStore │ │ EventMetrics │ │ Broker │ │
│ │ File / Memory│ │ lock-free │ │ routing ⚑ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└──────────────────────────────────────────────────────────┘
⚑ = behind feature gateProvider Comparison
Prop
Type
Core Types
Prop
Type
Feature-Gated Types
Prop
Type
Test Coverage
176 unit tests + 29 memory integration tests + 9 NATS integration tests + 2 doc tests.