Skip to content

Failing test: global partitioning + Separated mode#2292

Closed
jeremydmiller wants to merge 1 commit intomainfrom
test/global-partition-separated-handler-conflict
Closed

Failing test: global partitioning + Separated mode#2292
jeremydmiller wants to merge 1 commit intomainfrom
test/global-partition-separated-handler-conflict

Conversation

@jeremydmiller
Copy link
Member

Summary

  • Adds a failing integration test demonstrating that global partitioning combined with MultipleHandlerBehavior.Separated throws NoHandlerForEndpointException
  • The test sets up two global partitions for the same message types, with two separate handlers per message type and a cascading message flow
  • Related to Add global partitioning for cluster-wide GroupId concurrency control #2273 (global partitioning feature)

Root Cause Analysis

When Separated mode is active, all handlers are moved to sticky ByEndpoint chains bound to handler-type-specific local queues (e.g., local://partitionhandlerone/). Global partitioning routes messages to companion local queues (e.g., local://partition-a2/).

In HandlerGraph.HandlerFor(Type, Endpoint) (line 196), the fanout handler logic has this guard:

if (allLocal && endpoint is not LocalQueue)
{
    return getOrBuildFanoutHandler(messageType, chain);
}

throw new NoHandlerForEndpointException(messageType, endpoint.Uri);

The fanout handler only activates when the incoming endpoint is not a LocalQueue (i.e., an external transport endpoint). But global partition companion queues ARE LocalQueue instances, so the fanout path is skipped and the exception is thrown.

Error Output

NoHandlerForEndpointException: No handlers for message type PartitionedCommand 
at endpoint local://partition-a2/

Test plan

  • New test correctly fails demonstrating the bug
  • All 1160 existing CoreTests still pass

🤖 Generated with Claude Code

…andlerForEndpointException

When multiple global partitions are configured for the same message types
with MultipleHandlerBehavior.Separated, messages routed to the global
partition's companion local queues fail with NoHandlerForEndpointException.

The root cause is in HandlerGraph.HandlerFor(Type, Endpoint): the fanout
handler logic only activates when `endpoint is not LocalQueue`, but global
partition companion queues ARE LocalQueues. Since Separated mode moves all
handlers to sticky ByEndpoint chains bound to handler-type-specific local
queues, no handler matches the global partition local queue, and the fanout
path is skipped.

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.

1 participant