Subscribing to multiple topics when using ForwardingTopology

Hi,

My team is part of a large organization where some teams have already started using Azure Service bus and we’re now also about to start.

I’ve read about the forwarding topology and for our team internal stuff we will use one topic for all our events. But unfortunately there are other already established topics created by other teams with events we also need to subscribe to.

So question is if it’s still possible for an endpoint to subscribe to events from multiple topics? Or would that require us to create one endpoint per topic?

Hi!

As long as those endpoints emit events that your endpoint can understand (are they also NServiceBus endpoints?) you should be able to subscribe by adding the needed topic filters manually to those already established topics.

Would that work for you?

Cheers,

Andreas

@svift,

What @andreasohlund has suggested should work for you. I would recommend using ASB transport CLI to subscribe to the events you’d like. In case other teams using NServiceBus to publish messages, you won’t have to modify almost anything as the filters created for those events will just work. Otherwise, you’ll have to create rules with filters to ensure messages are captured and forwarded to your endpoint’s queue. In both cases, you’ll need to use -t | --topic option to point the CLI to the other team’s topic(s).

I was wondering if there were any way of doing this with the AutoSubscribe feature, but I understand from your answers that it’s not. But no problem writing the code to create the subscription on endpoint startup.

Thank you for your replies and for pointing me in the right direction!