feat: event ids, outbox identity migration

This commit is contained in:
2026-10-25 23:57:24 +01:00
parent c31aa033cc
commit 32dfc84697
14 changed files with 287 additions and 39 deletions

View File

@@ -154,6 +154,16 @@ pub enum EventPayload {
},
}
/// Wire form of an event: the tagged payload plus its optional identity.
/// Messages without `event_id` (queued before identities existed) still decode.
#[derive(Debug, Serialize, Deserialize, PartialEq)]
pub struct EventMessage {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub event_id: Option<String>,
#[serde(flatten)]
pub payload: EventPayload,
}
impl EventPayload {
pub fn event_type(&self) -> &'static str {
match self {