NServiceBus:使用 WSDL 使类型可发现

发布于 2024-09-12 03:40:52 字数 320 浏览 1 评论 0原文

出版商曝光出版物的最佳方式是什么?我认为这只是 3 条信息:

  1. 消息的架构
  2. 消息的编码
  3. 可以注册新订阅端点的端点

对于 #1,我可以看到它以多种方式共享:WSDL、 XSD、.cs 文件、.dll

对于 #2,它可能是二进制、SOAP、JSON 等。

对于 #3,我可以看到它被共享为 Publisher/PublisherInputQueue 或者可能是订阅数据库的连接字符串

我的问题是,在所有这些选项中,哪个是最好的选择?特别是对于#1和#2,我想知道不同选项的优点/缺点。谢谢!

What is the best way for a publisher to expose a publication? I would think that it would be just 3 pieces of information:

  1. The schema of the messages
  2. The encoding of the messages
  3. The endpoint where new subscription endpoints can be registered

For #1, I can see this being shared in a number of ways: WSDL, XSD, .cs file, .dll

For #2, it would probably be binary, SOAP, JSON, etc.

For #3, I can see this being shared as a Publisher/PublisherInputQueue or maybe a connection string to a Subscription DB

My question is, with all of these options, which is the best choice? Especially for #1 and #2, I would like to know pros/cons of the different options. Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

∝单色的世界 2024-09-19 03:40:52

对于#1,您可以为订阅者提供 DLL 或使用 XsdGenerator.exe 工具为其生成 XSD。

对于#2,在进行发布/订阅时,您通常需要松散耦合的交互,因此使用 XmlSerializer 可能是您的最佳选择。当涉及到向服务器发送命令的客户端时,您可能更喜欢 BinarySerializer。

至于#3,这是管理员通常管理的事情。

For #1, you can give subscribers the DLL or generate an XSD for it using the XsdGenerator.exe tool.

For #2, when doing pub/sub, you usually want loosely coupled interaction so using the XmlSerializer will probably be your best choice. When it comes to clients that are sending commands to a server, you may prefer the BinarySerializer.

As to #3, this is something that administrators usually manage.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文