You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the timed outbox sweeper we use a Locking provider
varlockId=_distributedLock.ObtainLockAsync(LockingResourceName,CancellationToken.None).Result;if(lockId!=null){s_logger.LogInformation("Outbox Sweeper looking for unsent messages");varscope=_serviceScopeFactory.CreateScope();try{IAmACommandProcessorcommandProcessor=scope.ServiceProvider.GetService<IAmACommandProcessor>();varoutBoxSweeper=newOutboxSweeper(millisecondsSinceSent:_options.MinimumMessageAge,commandProcessor:commandProcessor,_options.BatchSize,_options.UseBulk,_options.Args);if(_options.UseBulk)outBoxSweeper.SweepAsyncOutbox();elseoutBoxSweeper.Sweep();}catch(Exceptione){s_logger.LogError(e,"Error while sweeping the outbox.");throw;}finally{_distributedLock.ReleaseLockAsync(LockingResourceName,lockId,CancellationToken.None).Wait();scope.Dispose();}}
...
however inside of the External bus Service we do the following
Describe the bug
In the timed outbox sweeper we use a Locking provider
however inside of the External bus Service we do the following
meaning that we release the Lock inside of the Timed Sweeper service without any assurances that the Sweep is finished
The text was updated successfully, but these errors were encountered: