Distributed message queue with V3 reliability and Valkey support
Metalymph/relay does not have a README file
pub struct AdminReport {
status : SystemStatus
requires_attention : Bool
queue_size : Int?
dlq_size : Int?
pending_count : Int64?
summary : String
}pub struct BackendCapabilities {
supports_ack : Bool
supports_dlq : Bool
supports_pending : Bool
supports_consumer_groups : Bool
supports_health_checks : Bool
supports_telemetry : Bool
}pub struct Message[T] {
id : String
payload : T
attempt_count : Int
}pub struct OtelAttribute {
key : String
value : String
}pub struct PrometheusMetric {
name : String
value : Float
}pub struct QueueInspection {
status : SystemStatus
queue_size : Int?
dlq_size : Int?
pending_count : Int64?
backend_healthy : Bool
}pub struct QueueMetrics {
size : Int?
dlq_size : Int?
pending_count : Int64?
}pub struct RedisBackend[T] {
client : Client
key : String
serialize : (T) -> String
deserialize : (String) -> T
next_id : Int
}fn[T] RedisBackend::new(client : Client, key : String, serialize~ : (T) -> String, deserialize~ : (String) -> T) -> RedisBackend[T]pub struct RedisStreamBackend[T] {
client : Client
stream : String
dlq_stream : String
group : String
consumer : String
serialize : (T) -> String
deserialize : (String) -> T
}async fn[T] RedisStreamBackend::nack_message(self : RedisStreamBackend[T], msg : Message[T]) -> Unitfn[T] RedisStreamBackend::new(client : Client, stream : String, group : String, consumer : String, serialize~ : (T) -> String, deserialize~ : (String) -> T) -> RedisStreamBackend[T]fn[T] RedisStreamBackend::new_with_dlq(client : Client, stream : String, dlq_stream : String, group : String, consumer : String, serialize~ : (T) -> String, deserialize~ : (String) -> T) -> RedisStreamBackend[T]async fn[T] RedisStreamBackend::pop_block(self : RedisStreamBackend[T], block_ms : Int) -> Message[T]async fn[T] RedisStreamBackend::recover_or_pop(self : RedisStreamBackend[T], min_idle_ms : Int, block_ms : Int) -> Message[T]async fn[T] RedisStreamBackend::recover_pending(self : RedisStreamBackend[T], min_idle_ms : Int) -> Message[T]?fn[T] RedisStreamBackend::to_relay_queue_with_recovery(self : RedisStreamBackend[T], min_idle_ms : Int, block_ms : Int) -> RelayQueue[T]pub struct RelayQueue[T] {
push_fn : async (T) -> Unit
pop_fn : async () -> Message[T]
ack_fn : async (String) -> Unit
nack_fn : async (String) -> NackResult
size_fn : () -> Int
}fn[T] RelayQueue::new(push~ : async (T) -> Unit, pop~ : async () -> Message[T], ack~ : async (String) -> Unit, nack~ : async (String) -> NackResult, size~ : () -> Int) -> RelayQueue[T]pub struct RetryPolicy {
max_attempts : Int
}pub struct TelemetryEvent {
timestamp_ms : Int64
status : SystemStatus
severity : IncidentSeverity?
incident_count : Int
summary : String
}pub struct WorkerMetrics {
processed : Int
succeeded : Int
failed : Int
retries : Int
dlq_routed : Int
ack_failed : Int
nack_failed : Int
uptime_ms : Int64
last_success_at_ms : Int64?
last_failure_at_ms : Int64?
}pub struct WorkerStats {
processed : Int
succeeded : Int
failed : Int
retries : Int
dlq_routed : Int
ack_failed : Int
nack_failed : Int
started_at_ms : Int64
last_success_at_ms : Int64?
last_failure_at_ms : Int64?
}fn collect_snapshot(worker : WorkerMetrics?, queue : QueueMetrics?, health : BackendHealth?) -> RelaySnapshotfn detect_incidents_with_capabilities(report : AdminReport, capabilities : BackendCapabilities) -> Array[Incident]