Skip to content
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

[Host.AzureServiceBus] Add option for replacing already defined rules in ASB subscription #176

Conversation

ziurek
Copy link
Contributor

@ziurek ziurek commented May 4, 2023

This PR adds option CanConsumerReplaceSubscriptionFilters which is set to false by default.
If it's true, then whenever any rules are already defined for ASB subscription, then SMB will replace them with newly defined ones.

Context: I observed an issue, if a subscription was defined without the rules, and after some time I decided to add some, then subscription had two rules:

  • $Default
  • and newly added rule

Expected behaviour is to remove the default one, once new rules are declared.

How to use this behaviour: set ServiceBusTopologySettings's CanConsumerReplaceSubscriptionFilters flag to true.
Once you do it, if you defined any set of rules, they will override already exisiting ones.

NOTE: It compares already existing rules by name, so let say: if there is a rule with name rule and then you define new rule with name rule but different condition, it won't override it. To be discussed this should work like this, or rather it should compare condition as well.

Docs not yet updated.

Signed-off-by: Paweł Mazurek ziurek0@gmail.com

…ew ones.

Signed-off-by: Paweł Mazurek <ziurek0@gmail.com>
Signed-off-by: Paweł Mazurek <ziurek0@gmail.com>
Signed-off-by: Paweł Mazurek <ziurek0@gmail.com>
@zarusz zarusz merged commit e72a53a into zarusz:master May 5, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants