NServiceBus 4.4.2 如何在配置中设置 TimeoutPersisterReceiver 时间跨度 [英] NServiceBus 4.4.2 how do i set the TimeoutPersisterReceiver timespan in config

查看:59
本文介绍了NServiceBus 4.4.2 如何在配置中设置 TimeoutPersisterReceiver 时间跨度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何增加 TimeoutPersisterReceiver 的时间跨度?它目前在启动前重试约 1 分钟.我查看了文档,但看不到它的配置设置.

How do I increase the timespan of the TimeoutPersisterReceiver? it currently retries for ~1min after arming before firing. I have looked in the documentation but cannot see a config setting for it.

我们遇到了一些网络问题,导致服务无法与数据库通信,从而导致 RepeatedFailuresOverTimeCircuitBreaker 自行武装.

We have been having some network issues that prevented a service from talking to the database causing the RepeatedFailuresOverTimeCircuitBreaker to arm itself.

 INFO  NServiceBus.CircuitBreakers.RepeatedFailuresOverTimeCircuitBreaker [(null)] - The circuit breaker for TimeoutStorageConnectivity is now in the armed state

数据库最终会重新上线,但到它上线时,断路器已被触发,总线已被处理.我需要增加 NServiceBus.Timeout.Hosting.Windows.TimeoutPersisterReceiver 的时间跨度.

The database will eventually come back online but by the time it does the circuit breaker has been fired and the Bus has been disposed. I need to increase the time span of the NServiceBus.Timeout.Hosting.Windows.TimeoutPersisterReceiver.

NServiceBus.CircuitBreakers.RepeatedFailuresOverTimeCircuitBreaker [(null)] - The circuit breaker for TimeoutStorageConnectivity will now be triggered
FATAL NServiceBus [(null)] - Repeated failures when fetching timeouts from storage, endpoint will be terminated.

推荐答案

您可以尝试在实现 IWantToRunWhenBusStartsAndStops 并使用 TimeoutPersisterReceiver 的 SecondsToSleepBetweenPolls 属性的类中对其进行配置.

You can try to configure it in a class that implements IWantToRunWhenBusStartsAndStops and use the SecondsToSleepBetweenPolls property of the TimeoutPersisterReceiver.

但是,我想补充一点,在以后的版本中删除了对此配置选项的公共访问权限,我不是 100% 确定原因.可能有龙.请参阅 http://bit.ly/1ToyOHb(GitHub).

However, I would add that public access to this configuration option was removed in later versions, and I'm not 100% sure why. There may be dragons. See http://bit.ly/1ToyOHb (GitHub).

这篇关于NServiceBus 4.4.2 如何在配置中设置 TimeoutPersisterReceiver 时间跨度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆