feat: event ids, outbox identity migration
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user