从 NServiceBus 2.6 到 NServiceBus 3.0 的迁移补丁 [英] Migration patch from NServiceBus 2.6 to NServiceBus 3.0

查看:49
本文介绍了从 NServiceBus 2.6 到 NServiceBus 3.0 的迁移补丁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有的 NServiceBus 2.6 应用程序,我想开始迁移到 3.0.我正在寻找第一个实例的最小更改升级.这是像用 3.0 Nuget 包替换 2.6 DLL 一样简单还是有其他考虑?

I have an existing NServiceBus 2.6 application that I want to start moving to 3.0. I'm looking for the minimum change upgrade in the first instance. Is this as simple as replace the 2.6 DLLs with the 3.0 Nuget packages or are there other considerations?

推荐答案

在大多数情况下,应用程序迁移非常简单,但根据您的配置和环境,您可能需要进行以下更改:

For the most part the application migration is quite straight forward, but depending on your configuration and environment, you may need to make the following changes:

  • 端点配置的新约定可能意味着您需要重命名端点以匹配您的队列名称(@andreasohlund 有一个很好的 发布关于这个).

saga、超时、订阅等的持久性现在默认为 RavenDb,所以如果你使用 SQL Server 来持久化数据,你需要确保你必须正确配置文件和端点配置.对于 SQL Server 存储,请确保添加对 NServiceBus.NHibernate 的引用,因为它不再是核心的一部分.

persistence of saga, timeouts, subscriptions etc. now defaults to RavenDb, so if you use SQL Server to persist data, you need to make sure you have to correct profile and endpoint configuration. For SQL Server storage, make sure you add a reference to NServiceBus.NHibernate as it is no longer part of the core.

错误队列现在使用不同的配置以不同的方式引用.使用 MessageForwardingInCaseOfFaultConfig 而不是常规的 MsmqTransportConfig 错误属性.您应该仍然可以使用它,但它会首先查找 MessageForwardingInCaseOfFaultConfig.

Error queues are now referenced differently using different configuration ie. use MessageForwardingInCaseOfFaultConfig instead of the regular MsmqTransportConfig error property. You should still be able to use it, but it will look for the MessageForwardingInCaseOfFaultConfig first.

除此之外,我认为您无需执行任何其他操作即可让升级工作正常进行.我修改了我的一些消息定义,以利用新的 ICommand 和 IEvent 接口作为更清晰地传达意图的方式.

Other than that, I don't think you need to do anything else to get you upgrade working. I modified some of my message definitions to take advantage of the new ICommand and IEvent interfaces as a way communicatinf intent more clearly.

无论如何,我相信会有一些特定于您的环境的情况需要不同的更改,但我希望这会有所帮助.

Anyway, I'm sure there will be some cases that are specific to your environment that will require different changes but I hope this helps a bit.

这篇关于从 NServiceBus 2.6 到 NServiceBus 3.0 的迁移补丁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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