rebus-org / Rebus

:bus: Simple and lean service bus implementation for .NET
https://mookid.dk/category/rebus
Other
2.26k stars 355 forks source link

Use pub/sub on ASB and basic tier #836

Closed IlSocio closed 4 years ago

IlSocio commented 4 years ago

At the bottom of this page: https://github.com/rebus-org/Rebus/wiki/Azure-Service-Bus-transport It is written:

"*: When your Azure Service Bus instance (or "namespace", as they call it) is on the Basic tier, topics are not available. Rebus can work with that too, but it makes pub/sub messaging more cumbersome, because you need to configure some kind of subscription storage."

I looked for some example but I couldn't find any. So I tried to configure a centralized SQL Server storage using the code below:

           Configure.With(activator)
               .Logging(l => l.ColoredConsole(minLevel: LogLevel.Warn))
               .Transport(t => t.UseAzureServiceBus(connectionString, queue))
               .Subscriptions(s => s.StoreInSqlServer(dbConnectionString, "Subscriptions", isCentralized: true))
               .Start();

but I'm getting the error below: Attempted to register primary -> Rebus.Subscriptions.ISubscriptionStorage, but a primary registration already exists: primary -> Rebus.Subscriptions.ISubscriptionStorage (The Azure Service Bus transport was inserted as the subscriptions storage because it has native support for pub/sub messaging

Is this feature still supported or is there any other way to use pub/sub on ASB and basic tier? Thanks.

mookid8000 commented 4 years ago

I'm sorry, the Basic tier is no longer supported by Rebus 😞 I'll go and update the wiki accordingly.

Thanks for directing my attention towards this. Let me know if you need any guidance in switching over to Standard. 🙂