FluentStorage
FluentStorage copied to clipboard
Azure Servicebus: Migrate to new SDK and imeplement missing methods
Hello,
the AzureServicebus plugin for FluentStorage is implemented with the package Microsoft.Azure.ServiceBus
wich is deprecated since 2021. I cannot use it in any of my projects cause conflicts with outated references:
Version conflict detected for System.IdentityModel.Tokens.Jwt. I
Also there are missing functionalities, in the wiki we have this:
IMessagePublisher queuePublisher = StorageFactory.Messages.AzureServiceBusQueuePublisher(
connectionString,
queueName);
IMessagePublisher topicPublisher = StorageFactory.Messages.AzureServiceBusTopicPublisher(
connectionString,
topicName);
IMessageReceiver queueReceiver = StorageFactory.Messages.AzureServiceBusQueueReceiver(
connectionString,
queueName,
peekLock);
IMessageReceiver topicReceiver = StorageFactory.Messages.AzureServiceBusTopicReceiver(
connectionString,
topicName,
subscriptionName,
peekLock);
But in realty only these methods are currently implemented:
Plus i'm not 100% sure that sending directly to subiscriptions will work with the actual code.
I'm implementing a PR wich fixes everything and use the current, supported package.
Should my PR replace the current plugin (there would be breaking changes, is inevitable) or should i make a new package FluentStorage.Azure.Messaging.ServiceBus
(wich is similar to the name of the new Microsoft package) e maintain the older for retrocompatibility?
Need to write some more xml comments and integration test. I also added some utility method in the AzureServiceBusMessenger
class to better handle queues, topics and subscriptions (to see those, we need to cast the messenger to IAzureMessagingServiceBusMessenger
).
If it sounds good to you i can prepare a PR
Sounds excellent to me! Please make a PR asap!
We shall overwrite the old project. No need to make a new project. Less is better.
Please change the old project itself as required. I will release a major version package of it to indicate breaking changes.