I am moving the calculation engine from the Azure worker role in Azure Service Fabric. It works by listening to messages on the service bus, which are then processed based on the contents of the message.
The calculation is currently working correctly, but if the calculation takes more than a minute or so, the message will not be removed from the queue after completion. In the working role, we solved this by increasing the value of "AutoRenewTimeout".
var options = new OnMessageOptions { AutoComplete = true, AutoRenewTimeout = TimeSpan.FromMinutes(3) }; _queueClient.OnMessage(OnMessage, options);
However, using the "ServiceFabric.ServiceBus" nuget package, I cannot decide where you will install it. I used the demo project as a reference to setting up a stateless service that actually starts the calculation. The following is an excerpt from CalculateService.cs, where Stateless is initialized.
internal sealed class CalculateService : StatelessService { public CalculateService(StatelessServiceContext context) : base(context) { }
I tried using <BrokeredMessage> message.Complete(); but this caused a message blocking error.
source share