fix(nats): explicit consumer config, ack timeouts, unknown-event acking, delivery_count

This commit is contained in:
2026-05-15 16:20:31 +02:00
parent 75e8d349e3
commit 340886fcfe
3 changed files with 48 additions and 6 deletions

View File

@@ -72,6 +72,7 @@ pub enum DomainEvent {
pub struct EventEnvelope {
pub event: DomainEvent,
pub delivery_count: u64,
pub ack: Box<dyn Fn() + Send + Sync>,
pub nack: Box<dyn Fn() + Send + Sync>,
}
@@ -79,6 +80,7 @@ impl std::fmt::Debug for EventEnvelope {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("EventEnvelope")
.field("event", &self.event)
.field("delivery_count", &self.delivery_count)
.finish()
}
}