Skip to content

Comments

Fix incoming RabbitMQ messages persisting to wrong store with [MartenStore]#2168

Merged
jeremydmiller merged 1 commit intomainfrom
GH2155
Feb 12, 2026
Merged

Fix incoming RabbitMQ messages persisting to wrong store with [MartenStore]#2168
jeremydmiller merged 1 commit intomainfrom
GH2155

Conversation

@jeremydmiller
Copy link
Member

Summary

  • When using ancillary Marten stores via [MartenStore], incoming RabbitMQ envelopes were persisted in the main store by DurableReceiver, but FlushOutgoingMessagesOnCommit attempted to mark them as handled in the ancillary store's table — causing the UPDATE to affect 0 rows and leaving envelopes permanently stuck in Incoming status.
  • Skip the in-transaction mark-as-handled SQL when the envelope was stored in the main store but the Marten session uses an ancillary store (Role == Ancillary). DurableReceiver then handles it normally via the main store.
  • Added a regression test in Wolverine.RabbitMQ.Tests that reproduces the exact scenario.

Closes #2155

Test plan

  • New test Bug_2155_ancillary_store_inbox_persistence passes with fix, fails without it
  • Full Wolverine.RabbitMQ.Tests suite passes (317/322, 5 pre-existing flaky failures unrelated to this change)

🤖 Generated with Claude Code

…Store] (#2155)

When using ancillary Marten stores via [MartenStore], FlushOutgoingMessagesOnCommit
was trying to mark incoming envelopes as handled in the ancillary store's table, but
DurableReceiver had persisted them in the main store. Skip the in-transaction
mark-as-handled when the stores differ and let DurableReceiver handle it normally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incoming RabbitMQ messages persist to default store instead of module-specific store when using modular monolith approach with separate databases

1 participant