NServiceBus:使用 WSDL 使类型可发现
出版商曝光出版物的最佳方式是什么?我认为这只是 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:
- The schema of the messages
- The encoding of the messages
- 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于#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.