Expand description
§Majra
مجرا (Arabic/Persian: conduit, channel) — Distributed queue & multiplex engine.
Shared messaging primitives for the AGNOS ecosystem, eliminating duplicate pub/sub, queue, relay, and heartbeat implementations across AgnosAI, daimon, SecureYeoman, and sutra.
Pure Rust, async-native — built on tokio, zero-copy where possible.
§Feature flags
| Feature | Default | Description |
|---|---|---|
pubsub | yes | Three-tier pub/sub: DirectChannel (73M/s), HashedChannel (16M/s), TypedPubSub (1.1M/s with wildcards) |
queue | yes | Multi-tier priority queue with DAG dependency scheduling |
relay | yes | Sequenced, deduplicated inter-node message relay |
ipc | no | Length-prefixed framing over Unix domain sockets |
heartbeat | yes | TTL-based health tracking with Online→Suspect→Offline FSM |
ratelimit | no | Per-key token bucket rate limiter |
barrier | no | N-way barrier synchronisation with deadlock recovery |
sqlite | no | SQLite persistence for managed queue |
fleet | no | Distributed job queue with work-stealing |
redis-backend | no | Redis-backed cross-process pub/sub and queues |
prometheus | no | Built-in Prometheus metrics exporter |
quic | no | QUIC transport with multiplexed streams and datagrams |
ipc-encrypted | no | AES-256-GCM encrypted IPC channels |
postgres | no | PostgreSQL persistence for workflow storage |
ws | no | WebSocket bridge for pub/sub fan-out |
full | — | Enables all features |
Modules§
- envelope
- Message envelope — the universal wire type for majra.
- error
- Shared error types for majra.
- heartbeat
- TTL-based node health tracking.
- metrics
- Observability hooks for majra primitives.
- namespace
- Tenant-scoped wrappers for majra primitives.
- pubsub
- Topic-based pub/sub with MQTT-style wildcard matching.
- queue
- Multi-tier priority queue with DAG dependency scheduling.
- relay
- Sequenced, deduplicated inter-node message relay.
- transport
- Pluggable transport layer for the relay.