iggy-rs / iggy

Iggy is the persistent message streaming platform written in Rust, supporting QUIC, TCP and HTTP transport protocols, capable of processing millions of messages per second.
https://iggy.rs
MIT License
1.84k stars 85 forks source link

Iggy website binary specification does not define MessageState #698

Open 0xg0nz0 opened 7 months ago

0xg0nz0 commented 7 months ago

This definition:

pub struct Message {
    pub offset: u64,
    pub state: MessageState,
    pub timestamp: u64,
    pub id: u128,
    pub checksum: u32,
    pub headers: Option<HashMap<HeaderKey, HeaderValue>>,
    pub length: u32,
    pub payload: Bytes,
}

references a MessageState enum that is not defined. From the Rust source code it should be defined as:

public enum MessageState {
    Available,  // Value = 1
    Unavailable,  // Value = 10
    Poisoned,  // Value = 20
    MarkedForDeletion  // Value = 30
}
spetz commented 7 months ago

You're correct, will update :)