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

[BUG] Java service bus: ServiceBusAdministrationClient.createSubscription does not create a rule when rule is included as a parameter #40024

Open
3 tasks done
Gray-M-Williams opened this issue May 3, 2024 · 2 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus

Comments

@Gray-M-Williams
Copy link

Gray-M-Williams commented May 3, 2024

Describe the bug
We are trying to use the ServiceBusAdministrationClient to create subscriptions with custom pre-defined rules. However, when calling the createSubscription method and including a custom rule as a parameter, the client does not create the rule we specified and just attaches the $Default 1=1 SQL Rule Filter every time.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new subscription using the method
ServiceBusAdministrationClient.createSubscription(String topicName, String subscriptionName, String ruleName,
        CreateSubscriptionOptions subscriptionOptions,
        CreateRuleOptions ruleOptions)

and include a custom-defined rule for the parameter CreateRuleOptions ruleOptions. Check the subscription in the Service Bus and confirm that the desired rule was not created, and rather a rule called $Default with filter 1=1 was created instead.

Code Snippet
Add the code snippet that causes the issue.

ServiceBusAdministrationClient adminClient = new ServiceBusAdministrationClientBuilder()
                .connectionString(connectionString)
                .buildClient();
adminClient.createSubscription(liveFeedTopic, storeTopicName, "store-filter",
                    new CreateSubscriptionOptions().setForwardTo(storeTopicName),
                    new CreateRuleOptions(new SqlRuleFilter("storeId LIKE '2708%'")));

Expected behavior
A new subscription is created with a rule called store-filter with the above SQL expression.

Setup (please complete the following information):

  • OS: MacOS
  • IDE: Intellij
  • Library/Libraries: com.azure:azure-sdk-bom:1.2.23
  • Java version: 17
  • Frameworks: Spring Boot

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus labels May 3, 2024
Copy link

github-actions bot commented May 3, 2024

@anuchandy @conniey @lmolkova

Copy link

github-actions bot commented May 3, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus
Projects
None yet
Development

No branches or pull requests

2 participants