I have no trouble with the concept of publish/subscribe but I cannot get my head around the (auto)configuration.
Scenario
- I have a front-end service (F1) which does a SEND of a command message (M1).
- This command message is received by a back-end (B1). B1 does some processing and then does a PUBLISH of notification message M2.
- Two services (F1 and F2) should receive a this notification message and do their processing/tasks.
[F1] =(M1)=> [B1] =(M2)=> [F1 & F2]
How do F1 and F2 subscribe to notification message M2 which is published/broadcasted by B1?
I cannot find actual configuration in either .config files or code in the samples and I cannot find documentation about this on the NServiceBus webcast.
There is IBus.Subscribe<T>
but I cannot see how to subscribe a certain instance. I would expect that I need to supply a queue to which to send the subscribe message to so that I return can receive publishes/announcements.
In short
In short B1 does a PUBLISH of M2.
- How can F1 and F2 subscribe to this this message?
- How does it work when auto subscribe is not used? So from code or config?