1

We're using MassTransit together with Azure Service Bus and we're facing the following issue:

When changing a property e.g. the MaxDeliveryCount on a subscription from 10 to 15:

            x.UsingAzureServiceBus((context, configurator) =>
            {
                configurator.Host(
                    "xyz");

                configurator.PropagateActivityTracingContext();

                configurator.SubscriptionEndpoint(
                    "consumer1",
                    "topic-name",
                    e =>
                    {
                        e.ConfigureConsumer<ExampleMessageConsumer>(context);
                        e.MaxDeliveryCount = 15;
                    });
            });

...the property value isn't changed on the already existing subscription in Azure.

The same for changing Topic-Properties, when the Topic already exist.

Is this "by-design" or a bug?

If this is "by-design", how to deal with this?

We are creating the Azure Service Bus Namespace through scripting (IaC) and letting MassTransit create our topics and subscriptions.

Thanks for your help.

Kind regards, Peter

Peter Wyss
  • 395
  • 2
  • 16

1 Answers1

0

MassTransit doesn't update the subscription if it exists, it only updates the rule/filter if it has changed. While it could be said that this is by design, there isn't really another way to deal with it beyond going into the Azure portal and changing it or using the management client (part of the Azure Service Bus NuGet package) to change it.

I don't remember why the update isn't performed if the subscription already exists, but I suspect there was a reason.

Chris Patterson
  • 28,659
  • 3
  • 47
  • 59
  • Just imagine what would happen if you had 2 consumers with different config but pointing to the same queue :) They would keep overriding each other. Which might result in both of them not working. This way first one wins. Second one either adjusts or (preferably) uses a different queue name. – Grzegorz W Jun 22 '23 at 11:29