Skip to content

Add MassTransit and NServiceBus interop for ASB topics and subscriptions#2371

Merged
jeremydmiller merged 1 commit intomainfrom
asb-topic-subscription-interop
Mar 29, 2026
Merged

Add MassTransit and NServiceBus interop for ASB topics and subscriptions#2371
jeremydmiller merged 1 commit intomainfrom
asb-topic-subscription-interop

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Summary

  • Add UseMassTransitInterop() and UseNServiceBusInterop() to AzureServiceBusTopic (publishing) and AzureServiceBusSubscription (listening)
  • Implement IMassTransitInteropEndpoint on both AzureServiceBusTopic and AzureServiceBusSubscription
  • Add fluent configuration methods to AzureServiceBusTopicSubscriberConfiguration and AzureServiceBusSubscriptionListenerConfiguration

Previously, MassTransit/NServiceBus interop was only available on Azure Service Bus queues. This enables sending Wolverine messages to ASB topics that can be received by MassTransit or NServiceBus, and receiving messages from MassTransit or NServiceBus on ASB subscriptions.

Usage

// Publish to a topic with NServiceBus interop
opts.PublishAllMessages().ToAzureServiceBusTopic("nsb-topic")
    .UseNServiceBusInterop();

// Listen on a subscription with MassTransit interop
opts.ListenToAzureServiceBusSubscription("wolverine-sub")
    .FromTopic("wolverine-topic")
    .UseMassTransitInterop(mt => { })
    .DefaultIncomingMessage<ResponseMessage>().UseForReplies();

Test plan

  • All 6 NServiceBus Azure interop tests pass (including 2 new topic/subscription tests)
  • All 4 MassTransit Azure interop tests pass (including 2 new topic/subscription tests)
  • Tests run against the Azure Service Bus emulator via docker-compose
  • Verify no regressions in existing ASB test suite

🤖 Generated with Claude Code

… topics and subscriptions

Previously interop was only available on queues. This adds UseMassTransitInterop() and
UseNServiceBusInterop() to AzureServiceBusTopic (for publishing) and
AzureServiceBusSubscription (for listening), along with the corresponding fluent
configuration methods.

Co-Authored-By: Claude Opus 4.6 (1M context) <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