Skip to content

Fix NRE when scheduling messages to ASB topics#2235

Merged
jeremydmiller merged 1 commit intomainfrom
GH2223
Feb 24, 2026
Merged

Fix NRE when scheduling messages to ASB topics#2235
jeremydmiller merged 1 commit intomainfrom
GH2223

Conversation

@jeremydmiller
Copy link
Member

Summary

  • Fixes Azure Scheduled Messaging to Topics broken since v5.13 #2223 - Azure Scheduled Messaging to Topics broken since v5.13
  • FindListenerCircuit() returns null for send-only endpoints (e.g. ASB topics) because topics are not listeners — only subscriptions are
  • EnqueueDirectlyAsync now handles this by falling back to the sending agent when no listener circuit exists
  • Made IEndpointCollection.FindListenerCircuit() return nullable IListenerCircuit?

Test plan

  • Added schedule_to_topic_with_subscription_listener test to using_native_scheduling.cs that publishes to a topic and listens via a subscription
  • All 5 ASB scheduling tests pass (the with_buffered_endpoint failure is a pre-existing flaky test)
  • Verified the fix does not affect Kafka (Kafka topics are both senders and listeners, so FindListenerCircuit already finds them)

🤖 Generated with Claude Code

…cs. Closes #2223

FindListenerCircuit returns null for send-only endpoints (e.g. Azure Service Bus topics)
since they have no listener. EnqueueDirectlyAsync now falls back to the sending agent
when no listener circuit is found, allowing scheduled messages to be sent through the
normal outbound path.

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.

Azure Scheduled Messaging to Topics broken since v5.13

1 participant