简体   繁体   中英

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

Let s say I have MicroserviceA sending a command to MicroserviceB

  1. Do I need to have a common project between both solutions that would share the MyCommand?
  2. How should I structure my db schema for nservicebus? Should I it be, for example, _endpoint.Send("receiver.microserviceB", myCommand) from the publisher and microserviceB will subscribe to 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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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