Distributed message queue with V3 reliability and Valkey support
Metalymph/relay does not have a README file
pub struct Message[T] {
id : String
payload : T
attempt_count : Int
}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 RelayQueue[T] {
push_fn : async (T) -> Unit
pop_fn : async () -> Message[T]
ack_fn : async (String) -> Unit
nack_fn : async (String) -> Unit
size_fn : () -> Int
}fn[T] RelayQueue::new(push~ : async (T) -> Unit, pop~ : async () -> Message[T], ack~ : async (String) -> Unit, nack~ : async (String) -> Unit, size~ : () -> Int) -> RelayQueue[T]pub struct RetryPolicy {
max_attempts : Int
}