These are chat archives for christopherread/Obvs

13th
May 2017
Christopher Read
@christopherread
May 13 2017 13:05
@mgnslndh Hi, yes you are supposed to only use the configuration API as there's a bit of setup involved to create the ServiceBus. Obvs's design assumes that even if you had 2 services inside one process, you would still want those processes be able to talk to or be called from the 'outside', ie: over a message transport such as Obvs.RabbitMQ or Obvs. ActiveMQ. So the fluent configuration currently assumes you'll have at least one service endpoint before calling the PublishLocally()
@mgnslndh in your simple 2 service scenario, how do you intend to call the services from your UI layer or other services?
Christopher Read
@christopherread
May 13 2017 13:56
@mgnslndh by way of explanation, in case the intended usage isn't clear:
  • create a serviceBus singleton when your process starts using fluent config
  • configure everything you need there
  • a service endpoint AsServer for each service in the process, and a service endpoint client AsClient for each external service you want to talk to
  • inject that serviceBus singleton into any classes which are part of your service(s), you might have many classes which you consider a single 'service'
  • in each of those classes, set up handlers/subscriptions for the different commands and requests that come in on the serviceBus, then use the serviceBus instance to publish events and responses which you want to go out
Christopher Read
@christopherread
May 13 2017 14:02
I wrote this embarrassingly rubbish Code Project article ages ago, but it might be useful in demonstrating a very simple client/server scenario :smile:
https://www.codeproject.com/Articles/886698/Connecting-a-simple-client-server-together-with-Ob