- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有两个辅助角色设置为 nservicebus 端点 (nservicebus 3.2.8),并且都使用 AzureDataBus 配置来处理大于为 azure 队列分配的大小的消息。我的雇主不允许在配置中放置凭据,因此使用 IProvideConfiguration 来配置存储凭据。
这似乎有效,但是 nservicebus 似乎仍在尝试使用本地开发存储连接初始化数据总线 channel ,这导致辅助角色重新启动多次。最终它启动并选择正确的配置。
关于如何配置数据总线 channel ,我是否做错了什么?
以下是辅助角色事件日志中的异常:
An unhandled exception occurred. Type: System.Exception Process ID: 2420
Process Name: WaWorkerHost
Thread ID: 6
AppDomain Unhandled Exception for role My.WorkerRole.Assembly_IN_1
Exception: Exception when starting endpoint, error has been logged. Reason: Unable to connect to the remote server
at NServiceBus.Hosting.GenericHost.Start()
at NServiceBus.Hosting.Azure.RoleEntryPoint.Run()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal()
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<StartRole>b__1()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Inner Exception: Unable to connect to the remote server
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
at Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.CreateIfNotExist(BlobRequestOptions options)
at NServiceBus.DataBus.Azure.BlobStorage.BlobStorageDataBus.Start()
at System.EventHandler.Invoke(Object sender, EventArgs e)
at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start(Action startupAction)
at NServiceBus.Hosting.GenericHost.Start()
Inner Exception: No connection could be made because the target machine actively refused it 127.0.0.1:10000
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
这会立即导致进程终止:
Application: WaWorkerHost.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception
Stack:
at NServiceBus.Hosting.GenericHost.Start()
at NServiceBus.Hosting.Azure.RoleEntryPoint.Run()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal()
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<StartRole>b__1()
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
这是我的端点配置:
internal class EndpointConfig : IConfigureThisEndpoint, AsA_Worker, IWantCustomInitialization
{
#region IWantCustomInitialization Members
public void Init()
{
Configure.With()
.DefaultBuilder()
.AzureConfigurationSource()
.MessageForwardingInCaseOfFault()
.AzureMessageQueue()
.JsonSerializer()
.AzureDataBus()
.AzureSubcriptionStorage()
.UnicastBus()
.DisableTimeoutManager()
.DisableSecondLevelRetries()
.IsTransactional(true)
.IsolationLevel(System.Transactions.IsolationLevel.ReadCommitted)
.PurgeOnStartup(false);
}
}
数据总线配置覆盖:
public class ConfigOverride : IProvideConfiguration<AzureDataBusConfig>
{
AzureDataBusConfig IProvideConfiguration<AzureDataBusConfig>.GetConfiguration()
{
return new AzureDataBusConfig()
{
ConnectionString = "my storage key";
};
}
}
最佳答案
听起来像是初始化逻辑中的计时问题,基本上,您在 nsb 应用配置覆盖之前调用 AzureDataBus(),然后回退到默认设置。您可以尝试将 IWantCustomInitialization 放在一个单独的类中(比它稍后运行一点)。
如果这没有帮助,请随时向我发送一个小副本,我会看一下!
PS:您可以省略 .With().DefaultBuilder(),因为它无论如何都是默认值!
亲切的问候,伊夫
关于azure - 由于数据总线配置问题,nservicebus worker 角色在 azure 重新启动中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14679403/
current advice on handling exceptions in NServiceBus是使用内置的设施。错误消息进入错误消息队列,并将日志写入磁盘。 但是,如果我想将我的错误发送到
我们正试图找出用于我们的 NServiceBus 服务的最佳线程数。我们在一台有 2 个四核的机器上运行它。我们在队列备份方面遇到了问题。我们从 100 个线程开始,然后增加到 200 个,事情变得更
我有一个现有的 NServiceBus 2.6 应用程序,我想开始迁移到 3.0。我正在寻找第一个实例的最小更改升级。这就像用 3.0 Nuget 包替换 2.6 DLL 一样简单,还是有其他考虑?
是否可以在 NServiceBus 版本 3.2.2 中禁用重试? 使用以下配置,可以禁用重试: 但当线程数设置为 20 时则不会。在这种情况下,消息会重试两次: 这看起来很像
NServiceBus 的“重试”系统很棒。它在确保像死锁这样的小事情不会把我们搞砸方面非常有效。 但是,有时我知道一条消息是不好的。从某种意义上说,再多的重试也无济于事。 有没有办法告诉 NServ
使用 NEventStore 时如何集成到 NServiceBus? 我是 NSB ans ES 的新手,并试图在使用 ES 和 CQRS 时找出 NSB 的最佳设置。 我以与示例中的 Dispatc
我刚刚开始使用 NServiceBus,无法弄清楚在代码中配置 MsmqTransport 时缺少什么。如果我这样配置发布者; IBus bus = Configure.With()
遵循此解释的最简单方法是 NServiceBus Pub/Sub 示例,其中包含“多态订阅”示例 (Subscriber2)。 消息:(未更改) public class EventMessage :
Udi 和 Andreas 多次提到 NServiceBus 安装的零停机升级。对 NServiceBus 安装执行零停机升级的正确方法是什么? 最佳答案 这意味着,由于 NSB 使用消息传递作为底层
我有一个场景,我需要通过一个简单的经过身份验证的 REST API 向第三方公开一堆在 NServiceBus 中创建的事件消息。第三方可能使用也可能不使用 .NET(它们甚至可能是浏览器中的 Jav
假设我使用延迟消息传递功能在将来的某个时间点发送消息,但稍后我可能想取消该消息。 问题 1 - 进行原始 bus.Defer(...) 调用时,如何为该消息取回唯一标识符?我希望有消息 ID 或某种超
背景 我们正在尝试在我们的公司中引入一种新的架构模式,并且正在考虑使用服务总线的具有事件源的 CQRS。我们目前正在开发 POC 的技术是 NServiceBus、事件存储和 MSMQ。我们希望在 N
NServiceBus 到底是 ESB 还是轻量级 ESB?还是更像具有持久/可靠消息传递的 WCF?在我看来,它更像是一个消息传递框架而不是 ESB。 只是想要一些指针,因为我刚刚开始研究不同的 E
我正在尝试将 NServiceBus 设置为使用远程错误队列来简化错误检查的管理。当我这样做时,我在 NServiceBus.Host.exe 启动时收到以下错误: 2010-03-25 07:59:
我知道这对很多人来说似乎很明显,但我的客户使用的模式我不太方便。 案例是,他们的客户通过 nservicebus 将存款或取款发送到第三方系统。第三方系统需要处理该交易,但可能需要数天,甚至数周才能完
有没有办法禁止将失败的消息发送到 NServiceBus 的错误队列? 对于一个特定的端点,我不想在二级重试失败后重试消息。相反,我将使用此处提到的 MessageSentToErrorQueue 错
我遇到了与重试相关的行为,在我尝试过的文档或搜索中找不到任何引用。基本上,如果我的处理程序处理消息的时间超过 60 秒(注意它不会引发异常),NServiceBus 会触发另一个处理程序来处理相同的消
我有一个需要以同步方式调用 nservicebus 的 Web 服务。 如何做到这一点? 最佳答案 查看 AsyncPages 示例。如果您希望它是同步的,只需阻塞直到回调完成。 希望这可以帮助! 关
我想创建一个由消息“Event1”开始的传奇,但它会忽略收到具有相同应用 ID 的“重复”开始消息(这可能是由于两个或多个用户在短时间内点击了 UI 按钮) .文档似乎表明这种方法可行: 佐贺声明 I
过去 6 个月的学习曲线充满挑战,CQRS 和 DDD 是罪魁祸首。 这很有趣,我们已经完成了项目的 1/2,而我还没有时间深入研究的领域是消息传递框架。 目前我不使用 DTC,所以有一个很好的可能性
我是一名优秀的程序员,十分优秀!