-
Notifications
You must be signed in to change notification settings - Fork 20
Support customization of attachment names in blob storage #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It sounds like a legitimate ask. If you'd like to give it a try, absolutely.
Thinking quickly here, I'd rather not modify the configuration ( var config = AzureStorageAttachmentConfiguration(...)
config.CustomAttachmentName(Func<Message, string>) |
@SeanFeldman I get that you would prefer to not make breaking changes, but I don't see how the configuration can store the new |
You're correct about adding another overload to the constructor. I'm just not sure how frequent this feature is to make it part of an overload. Let's see how it plays out on the PR. Perhaps I'm overthinking it 🙂 |
@CasperWSchmidt thank you for the PR. |
@SeanFeldman I don't see why the extension version is so much better than mine - the configuration is still changed (internal property added). With an optional parameter the api is not changed in a way that affects people updating. The only issue could be unit tests using mocks where even optional parameters must be specified (that's how Moq works). That said, it is your project and your solution adds the feature I need so please merge it 😊 |
@CasperWSchmidt by no means was my intent to even hint that it's "better". As a matter of fact, the alternative is entirely based on your suggestion and initial PR. The reason I'd rather go with an extension method is to isolate the intent and make it very explicit rather than add to an already overwhelming list of optional parameters. Regarding releasing - I was thinking to add Managed Identity support (#181), but that might be a bit more time-intensive than I have on my hands. If you have spare time, by all means :) |
@SeanFeldman okay "better" might not be the best word, but I didn't quite get why you were so keen on the extension when the configuration had to be changed. I do now and you're right. Too many (optional) parameters is a code-smell :) |
Is your feature request related to a problem? Please describe.
We have a a lot of events going through Azure Service Bus. Trying to find a specific one is quite hard.
Describe the solution you'd like
We would like to have some structure in the naming, fx. by having a Func<Message, string> in the configuration to decide the blob name. In our case something like date/topicName/messageId would be the optimal name.
I'm happy to create a PR with this if needed.
The text was updated successfully, but these errors were encountered: