Dmitry
Dmitry

Reputation: 1330

Cannot add a rule to Azure topic subscription

It's a very basic scenario and I don't know why it does not work.. I cannot add a rule to a topic.

    static void Main(string[] args)
    {
        var subscriptionClient = new SubscriptionClient(
            nsConnString,
            topicName,
            subsName,
            ReceiveMode.ReceiveAndDelete);

        subscriptionClient.AddRuleAsync(new RuleDescription
        {
            Filter = new CorrelationFilter { Label = Guid.NewGuid().ToString() },
            Name = Guid.NewGuid().ToString()
        }).Wait();

        Console.WriteLine("Success");
        Console.ReadKey();

    }

AddRuleAsync call always throws - "The service was unable to process the request; please retry the operation.". The service bus was created using MS Getting started section. I am using 0.0.7-preview package with .NET Core. I can send and receive messages using topics I create, I just cannot add rules for some reason.

Upvotes: 0

Views: 314

Answers (1)

Tom Sun
Tom Sun

Reputation: 24569

I can reproduce the issue that you mentioned with 0.0.7-preview package. Please have a try to use lastest Microsoft.Azure.ServiceBus 1.0.0-RC1 version. It works correctly on my side.

enter image description here

Upvotes: 1

Related Questions