rebus-org / Rebus.AzureQueues

:bus: Azure Storage Queues transport implementation for Rebus
https://mookid.dk/category/rebus
Other
7 stars 5 forks source link

QueueServiceClient instead of IQueueClientFactory #20

Closed SlowLogicBoy closed 1 year ago

SlowLogicBoy commented 1 year ago

Hey,

I'm curious is there a reason you are using your own IQueueClientFactory instead of QueueServiceClient?

mookid8000 commented 1 year ago

Honestly, I don't know why and how the IQueueClientFactory came to be. I just took a git blame view, and it looks like it has my name on it, but I don't recall having introduced it.

It could have something to do with supporting multiple types of authentication (e.g. connection string credentials, managed identity, etc.), but I'm not sure.

Do you know if QueueServiceClient can fill this role?

SlowLogicBoy commented 1 year ago

As far as I can see it does the same thing as IQueueClientFactory I thought Rebus could reuse QueueServiceClient that I configure and register 🤔 and Rebus could do TryAddSingleton or w/e, but I guess it's not a big deal we just have multiple factories for same QueueClient 🤔

mookid8000 commented 1 year ago

Ok! Let me know if you find out that there would be an advantage in switching over to QueueServiceClient 🙂