Use outbox for edit_thought instead of fire-and-forget publish #17

Open
opened 2026-07-25 11:18:32 +00:00 by GKaszewski · 0 comments
Owner

Severity: Medium

crates/application/src/use_cases/thoughts/mod.rs:

  • create_thought uses outbox.append() (reliable, persisted)
  • delete_thought uses outbox.append() (reliable, persisted)
  • edit_thought uses events.publish() directly (fire-and-forget via NATS)

The _events parameter in create_thought is unused (underscore-prefixed), and edit_thought bypasses the outbox entirely. If NATS is down during an edit, the update event is silently lost. All three should use the outbox for consistency.

**Severity: Medium** `crates/application/src/use_cases/thoughts/mod.rs`: - `create_thought` uses `outbox.append()` (reliable, persisted) - `delete_thought` uses `outbox.append()` (reliable, persisted) - `edit_thought` uses `events.publish()` directly (fire-and-forget via NATS) The `_events` parameter in `create_thought` is unused (underscore-prefixed), and `edit_thought` bypasses the outbox entirely. If NATS is down during an edit, the update event is silently lost. All three should use the outbox for consistency.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/thoughts#17