Scenario: we have a handler which will run for 30 mins, the default lock time is 5 mins, how do we increase this to 30 mins in an NSB endpoint hosted in azure.
tried the following setting from this link Configuration • Azure Service Bus Transport • Particular Docs,
but we are not able to set the property and see the error " Azure Functions endpoints do not control the message receiver and cannot decide the lock renewal duration.
Question: How do we set maxAutoLockRenewalDurati on the on NSB endpoint hosted in azure function
I have the following code in the azure function’s Program.cs.
//#region configuration-with-function-host-builder
[assembly: NServiceBusTriggerFunction("NSBTest")]
var host = new HostBuilder()
.UseNServiceBus((configuration, nsb) =>
{
nsb.AdvancedConfiguration.EnableOpenTelemetry();
var outbox = nsb.AdvancedConfiguration.EnableOutbox();
outbox.TimeToKeepOutboxDeduplicationData(TimeSpan.FromDays(configuration.GetValue<double>("OutBoxTimeSpan")));
nsb.AdvancedConfiguration.UseSerialization<NewtonsoftJsonSerializer>();
})
.Build();
host.Run();
Thanks -Nen