weixin_39758712
weixin_39758712
2021-01-01 13:15

Add ability to toggle message validation checks

Added MessagingBestPractices.TurnOffAllChecks

该提问来源于开源项目:Particular/NServiceBus

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

13条回答

  • weixin_39631667 weixin_39631667 4月前

    I'm not sure we want to allow the user to control this. Remember NServiceBus is an opinionated framework :wink: And we are called Particular for a reason :smile:

    thoughts?

    点赞 评论 复制链接分享
  • weixin_39587407 weixin_39587407 4月前

    I am not against this. people can already turn them off by setting the conventions to return true for every message type

    I imagine it could be helpful in testing and prototyping scenarios

    I assume you have a reason for wanting this? perhaps you could add some more detail?

    点赞 评论 复制链接分享
  • weixin_39758712 weixin_39758712 4月前

    , I remember this argument from .NSB is opinionated, but not arrogant!

    Main issue is events don't work when sent over the gateway. Having two sites communicate over the gateway (within the same logical service) means that I have to translate an event to a command (or message) and then back to event again. Death by 1000 handlers that don't do actual business logic.

    The best practices work well for the main endpoint q, but get in the way for satellites like gateway and the email thing.

    I will check if setting all conventions to return true works. If it does, then that is a viable solution.

    点赞 评论 复制链接分享
  • weixin_39758712 weixin_39758712 4月前

    We currently have a small number of endpoints per site (mostly 2), but a large number of sites (> 100s). Majority of comms happens over the gateway, so any friction is a major pain point.

    I was really looking forward to https://github.com/Particular/NServiceBus/issues/692 that got closed

    点赞 评论 复制链接分享
  • weixin_39690963 weixin_39690963 4月前

    I actually had to enable a similar thing when doing bus.defer. I can see the need for this so lets pull.

    We just hide it away from the users:)

    Sent from my iPhone

    On 1 dec 2013, at 23:23, John Simons notifications.com wrote:

    I'm not sure we want to allow the user to control this. Remember NServiceBus is an opinionated framework And we are called Particular for a reason

    thoughts?

    — Reply to this email directly or view it on GitHub.

    点赞 评论 复制链接分享
  • weixin_39886238 weixin_39886238 4月前

    Let me play devil's advocate: Wouldn't it be better to address the real issue (root cause) behind it and enabling the gateway to pass also events instead of adding yet another configuration param?

    点赞 评论 复制链接分享
  • weixin_39631667 weixin_39631667 4月前

    I agree with , it definitely feels like we adding a hack as a result of a design flaw

    点赞 评论 复制链接分享
  • weixin_39690963 weixin_39690963 4月前

    That's kind of what I had to do for the Defer

    https://github.com/Particular/NServiceBus/commit/d745e70378b394210426debb6e16d3a9717b7053

    Perhaps we should do the same for the SendToSites?

    On Mon, Dec 2, 2013 at 8:03 AM, danielmarbach notifications.comwrote:

    Let me play devil's advocate: Wouldn't it be better to address the real issue (root cause) behind it and enabling the gateway to pass also events instead of adding yet another configuration param?

    — Reply to this email directly or view it on GitHubhttps://github.com/Particular/NServiceBus/pull/1817#issuecomment-29598119 .

    点赞 评论 复制链接分享
  • weixin_39631667 weixin_39631667 4月前

    That sounds like a better plan IMO

    On 2 December 2013 18:12, Andreas Öhlund notifications.com wrote:

    That's kind of what I had to do for the Defer

    https://github.com/Particular/NServiceBus/commit/d745e70378b394210426debb6e16d3a9717b7053

    Perhaps we should do the same for the SendToSites?

    On Mon, Dec 2, 2013 at 8:03 AM, danielmarbach notifications.comwrote:

    Let me play devil's advocate: Wouldn't it be better to address the real issue (root cause) behind it and enabling the gateway to pass also events instead of adding yet another configuration param?

    — Reply to this email directly or view it on GitHub< https://github.com/Particular/NServiceBus/pull/1817#issuecomment-29598119>

    .

    — Reply to this email directly or view it on GitHubhttps://github.com/Particular/NServiceBus/pull/1817#issuecomment-29598403 .

    点赞 评论 复制链接分享
  • weixin_39690963 weixin_39690963 4月前

    would that work for you?

    if so can you open another pull for that fix?

    点赞 评论 复制链接分享
  • weixin_39758712 weixin_39758712 4月前

    , yes, if I understand correctly. bus.SendToSites would work with any kind of class or interface type?

    点赞 评论 复制链接分享
  • weixin_39690963 weixin_39690963 4月前

    Yes

    On Mon, Dec 2, 2013 at 9:28 AM, chrisbednarski notifications.comwrote:

    https://github.com/andreasohlund, yes, if I understand correctly. bus.SendToSites would work with any kind of class or interface type?

    — Reply to this email directly or view it on GitHubhttps://github.com/Particular/NServiceBus/pull/1817#issuecomment-29601179 .

    点赞 评论 复制链接分享
  • weixin_39758712 weixin_39758712 4月前

    Thanks

    点赞 评论 复制链接分享

相关推荐