Skip to content

Route forwarded events through partitioned topologies (keep ShardedMessageRoute in EventForwardingRouter) - #6116

Open
carcer wants to merge 1 commit into
JasperFx:mainfrom
carcer:fix/event-forwarding-partitioned-routes
Open

carcer wants to merge 1 commit into
JasperFx:mainfrom
carcer:fix/event-forwarding-partitioned-routes

Conversation

@carcer

@carcer carcer commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #6115

EventForwardingRouter filtered the explicit and local routes for IEvent<T> to MessageRoute only. That silently dropped the ShardedMessageRoute a partitioned topology returns, so forwarded events skipped partitioning. This change keeps every IMessageRoute. The router is shared, so the fix covers Marten, Polecat and Fisher.

Tests: MartenTests.Bugs.forwarded_events_to_partitioned_local_messaging covers:

  • a topology matching by MessagesImplementing<IEvent<T>>();
  • a topology matching by Message<IEvent<T>>();
  • the same group always landing on the same slot.

Both matching cases fail on main, sending events to local://ieventpartitionedfeatureenabled/, and pass with the fix. The existing event-forwarding test classes in MartenTests (11 classes, 23 tests, net10.0) still pass, including event_forwarding_routing_bug, which covers the 2024 explicit-routing fix. I haven't run the Polecat or Fisher suites.

🤖 Generated with Claude Code

EventForwardingRouter filtered the explicit and local routes for IEvent<T> to
MessageRoute, which silently dropped the ShardedMessageRoute a partitioned
topology returns. Forwarded events then ran on their conventional local queue
instead of the topology's slot queues. Keep every IMessageRoute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeremydmiller

Copy link
Copy Markdown
Member

Hey @carcer, are you okay with this only landing in 7.0, or would you want it back ported?

And thanks Chris!

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.

Forwarded events ignore partitioned local messaging: EventForwardingRouter drops ShardedMessageRoute

2 participants