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

[Service Bus] : [BUG] : delete a subscription isn't sync #18536

Closed
3 tasks done
algra4 opened this issue Jan 11, 2021 · 4 comments
Closed
3 tasks done

[Service Bus] : [BUG] : delete a subscription isn't sync #18536

algra4 opened this issue Jan 11, 2021 · 4 comments
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-author-feedback More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus

Comments

@algra4
Copy link

algra4 commented Jan 11, 2021

Describe the bug
The removal of a subscription is not synchronize.

Exception or Stack Trace
No stack

To Reproduce
Call the method

  1. deleteSubscription(..., ...)
  2. getSubscription(..., ...)

Subscription always present

Code Snippet

    public void deleteSubscription(String topicName, String subscriptionName) {
        asyncClient.deleteSubscription(topicName, subscriptionName);
    }

Should be :

    public void deleteSubscription(String topicName, String subscriptionName) {
        asyncClient.deleteSubscription(topicName, subscriptionName).block();
    }

Expected behavior
The subscription should be deleted immediately

Screenshots

Setup (please complete the following information):

  • OS: Windows
  • IDE : IntelliJ
  • azure-messaging-servicebus:com.azure:7.0.0

Additional context
Add any other context about the problem here.

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
@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 11, 2021
@alzimmermsft alzimmermsft added Client This issue points to a problem in the data-plane of the library. Service Bus labels Jan 11, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jan 11, 2021
@hemanttanwar
Copy link
Contributor

Hello @algra4 , Thank you for opening the issue. Looks like you are using ServiceBusAdministrationAsyncClient . We are using Reactor Programming model for Async Client and you will need to use .block() or subscribe() to execute the call. You can go through this blog which explain this in bit more detail https://devblogs.microsoft.com/azure-sdk/async-programming-with-project-reactor/#using-async-apis-in-the-new-azure-sdk-for-java

If you like to use Sync client instead , Here is an example of how sync client can be created

// Create a administrator client using connection string.
        ServiceBusAdministrationClient client = new ServiceBusAdministrationClientBuilder()
            .connectionString(connectionString)
            .buildClient();

@algra4
Copy link
Author

algra4 commented Jan 11, 2021

Thank for you response @hemanttanwar 👍

But it's normal that in ServiceBusAdministrationClient class, all methods you call the .block() method after you call the asyncClient.

Expect in the method deleteSubscription(String topicName, String subscriptionName) (link to the method).

For this reason, I think it's a "bug" 😄

@hemanttanwar
Copy link
Contributor

@algra4 Thank you for clarifying information. You are right . We will fix it soon and release it in a week.

@hemanttanwar
Copy link
Contributor

This fix is now released . You can download it from here https://search.maven.org/artifact/com.azure/azure-messaging-servicebus .
Closing this issue now.

@ramya-rao-a ramya-rao-a added the needs-author-feedback More information is needed from author to address the issue. label Feb 22, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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-author-feedback More information is needed from author to address the issue. 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

4 participants