简体   繁体   English

具有SQL传输的NService总线

[英]NService bus with SQL Transport

I'm trying to understand what needs to be done to use sql server for with NServicebus in .Net Core 我正在尝试了解将.net Core中的NServicebus与sql服务器一起使用需要做些什么

Let s say I have MicroserviceA sending a command to MicroserviceB 假设我有MicroserviceA向MicroserviceB发送命令

  1. Do I need to have a common project between both solutions that would share the MyCommand? 两个共享MyCommand的解决方案之间是否需要一个公共项目?
  2. How should I structure my db schema for nservicebus? 我应该如何为nservicebus构建数据库模式? Should I it be, for example, _endpoint.Send("receiver.microserviceB", myCommand) from the publisher and microserviceB will subscribe to receive.microserviceB? 我应该是例如发布者的_endpoint.Send(“ receiver.microserviceB”,myCommand),而microserviceB会订阅receive.microserviceB吗?
  3. Not too sure where the data is stored if I publish an event instead of a command. 如果我发布事件而不是命令,则不太确定数据的存储位置。
  4. How can I have different settings for different environment? 如何针对不同的环境进行不同的设置? Eg:SQL transport for local, sqs in prod 例如:在产品中进行本地,SQL的SQL传输

Thanks 谢谢

  1. Yes
  2. endpoint.Send(myCommand); , don't specify a receiver there ,请不要在此处指定接收方
  3. Does it matter? 有关系吗?
  4. Theoretically, you can, but I'd advise against that. 从理论上讲,您可以,但是我建议您不要这样做。

For more information on my answers, be sure to check out the step-by-step tutorial and for example, more information on transactions in both SQL and SQS transports. 有关我的答案的更多信息,请务必查看分步教程 ,例如,有关SQL和SQS传输中事务的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM