Mauro Servienti and Sean Farmar show how to use NServiceBus to power a web application with real-time request-response and publish-subscribe messaging.
Learn to:
* Broadcast ‘push’ notifications to many clients
* Send response notifications to specific clients
* Handle front end scale-out requirements with little effort
* Design and use a backplane to cover more complex scenarios
* Connect NServiceBus with .NET SignalR
3. Targeted responses overview
• Also identified as Request/Reply
• Technical requirements may drive in the Request/Reply direction:
• As seen with Elton Stoneman: SignalR clients
• IoT devices that cannot participate in a pub/sub based architecture
• Integrations with third party services or legacy systems
4. Queue
Request / Reply scenario
SignalR
client
HTTP based
Front-end
Back-end
system
Message MessageSocket
Reply MessageReply Message
11. Single Responsibility Principle
• Backplanes and Unique Qs force endpoints to have one responsibility:
• Talk to the SignalR client (in our sample)
• Be the bridge connecting 2 different infrastructures using different transports
• Such endpoints can’t have any business responsibility:
• All the instances would receive a copy of the message
• All the instances would try to execute the same business logic