Skip to content

Fix UseDurableOutboxOnAllSendingEndpoints() not applying to topic exchange endpoints#2386

Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom
BlackChepo:main
Mar 31, 2026
Merged

Fix UseDurableOutboxOnAllSendingEndpoints() not applying to topic exchange endpoints#2386
jeremydmiller merged 1 commit intoJasperFx:mainfrom
BlackChepo:main

Conversation

@BlackChepo
Copy link
Copy Markdown
Contributor

  • UseDurableOutboxOnAllSendingEndpoints() did not apply to RabbitMQ topic exchange endpoints created via PublishMessagesToRabbitMqExchange<T>(), causing messages to be discarded when the broker is unreachable instead of being persisted in the outbox
  • The root cause is that AllSenders() only iterates over subscriber endpoints, but PublishMessagesToRabbitMqExchange registers a TopicRouting<T> via PublishWithMessageRoutingSource() — the underlying exchange endpoint was never visited by the policy

Fixes #2385

…hange endpoints

AllSenders() filtered endpoints by Subscriptions.Any(), which missed
endpoints registered via PublishMessagesToRabbitMqExchange<T>() since
TopicRouting uses routing sources instead of subscriptions. Messages
sent to topic exchanges used InlineSendingAgent and were discarded
after 3 failed attempts instead of being persisted to the outbox.

Add IEndpointSource interface so routing sources can expose their
target endpoints, and update AllSenders() to also check routing
source endpoints when applying policies.
@jeremydmiller jeremydmiller merged commit 2bfbf1e into JasperFx:main Mar 31, 2026
17 of 19 checks passed
@jeremydmiller
Copy link
Copy Markdown
Member

@BlackChepo Thank you!

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.

UseDurableOutboxOnAllSendingEndpoints() does not apply to topic exchange endpoints via PublishMessagesToRabbitMqExchange

2 participants