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
Workaround: add code below after calling Bus.Shutdown()
var timeoutManager = Configure.Instance.Builder.Build<IManageTimeouts>();
var eventInfo = timeoutManager.GetType().GetEvent("TimeoutPushed");
var receiver = Configure.Instance.Builder.BuildAll<ISatellite>()
.OfType<TimeoutDispatcherProcessor>().Single().TimeoutPersisterReceiver;
var handler = receiver.GetType().GetMethod("TimeoutsManagerOnTimeoutPushed",
BindingFlags.NonPublic | BindingFlags.Instance);
var d = Delegate.CreateDelegate(eventInfo.EventHandlerType, receiver, handler);
object[] methodArgs = { d };
var removeHandler = eventInfo.GetRemoveMethod();
removeHandler.Invoke(timeoutManager, methodArgs);
When the bus is restarted using
Bus.Start()
,Bus.Shutdown()
thenBus.Start()
timeout messages can throw an exception and end up in the error queue.If a saga message handler requests any timeouts, the message being handled is rolled back and always ends up in error queue.
TimeoutPushed.BeginInvoke
throwsSystem.ArgumentException
saying The delegate must have only one target. insideDefaultTimeoutManager.PushTimeout()
This is because
TimeoutPersisterReceiver.Stop
does not unsubscribe fromTimeoutManager.TimeoutPushed
eventStack trace below:
The text was updated successfully, but these errors were encountered: