Service Bus message abandoned despite WebJobs SDK handler completed successfully

你离开我真会死。 提交于 2019-12-04 13:10:56

[Edited previously incorrect response]

The WebJobs SDK relies on the automatic lock renewals done by MessageReceiver.OnMessageAsync. These renewals are governed by the OnMessageOptions.AutoRenewTimeout setting, which can be configured like so in the v1.1.0 release of the WebJobs SDK:

JobHostConfiguration config = new JobHostConfiguration();

ServiceBusConfiguration sbConfig = new ServiceBusConfiguration();
sbConfig.OnMessageOptions = new OnMessageOptions
{
  MaxConcurrentCalls = 16,
  AutoRenewTimeout = TimeSpan.FromMinutes(10)
};

config.UseServiceBus(sbConfig);

You can also customize these values via a custom MessageProcessor. See the release notes here for more details on these new features.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!