jeremydmiller on master
improved message tracking and t… (compare)
JasperOptions.ScheduledJobs.FirstExecution
and JasperOptions.ScheduledJobs.PollingTime
, which seems to control the durability agent's queue processing. I set them both to 2 minutes (default of 0 seconds and 5 seconds respectively), and the problem seems to go away.
DurabilityLoopbackSendingAgent.StoreAndForward()
.
.StoreAndForward()
initially saves the message as an incoming message with an OwnerId
of 0 (= AnyNode), and then immediately throws it into it's WorkerQueue
, which will start running the handler regardless of the "owning node". Then, since the RecoverIncomingMessages
fires every 5 seconds by default, assuming the handler takes longer than 5 seconds to run, it will see the message sitting in the incoming messages table, and "recover it" and run it again.
2 callback)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Hosting.Internal.HostedServiceExecutor.ExecuteAsync(Func
2 callback)[11:09:25 FTL] An error occurred stopping the application
System.AggregateException: One or more errors occurred. (A task was canceled.) ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Jasper.Messaging.Durability.DurabilityAgent.StopAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.Internal.HostedServiceExecutor.ExecuteAsync(Func`2 callback)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Hosting.Internal.HostedServiceExecutor.ExecuteAsync(Func`2 callback)
at Microsoft.AspNetCore.Hosting.Internal.HostedServiceExecutor.StopAsync(CancellationToken token)
---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Jasper.Messaging.Durability.DurabilityAgent.StopAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.Internal.HostedServiceExecutor.ExecuteAsync(Func`2 callback)<---