Introduction
I’ve recently created an few application within the same solution using the NServiceBus designer tools. This all worked great as it allowed me to keep everything to a set standard. What I’ve noticed is that the tool seems to want to keep all messages, commands and events in their own assembly across the services I’ve created.
Consider the following setup:
Solution name: TestCompany
Services created: TestCompany.Sales, TestCompany.Finance, TestCompany.Monitoring
The above would create a TestCompany.InternalMessages assembly and the Monitoring service is essentially a central point where any errors that may have occurred are logged. I’d like that the other services can just send a message through to it.
Problem
My concern in this instance is that I’d like the sales service to send a message to the finance service as well as an error to the monitoring should it occur. Within the unicastbus setup you enter the assembly and it’s destination, however I’d essentially like to enter different destinations for different messages within the assembly. I know I could very well just create my own assembly and move the messages to it however it seems to go against what the designer is trying to push me towards. Any suggestions?
Update:
I believe the problems I’m having to deal with are slightly related to the way modelling templates are installed. I’ve noticed they don’t quite work for me as I’m unable to add components on to the end point designer nor am I able to right click without receiving a null reference exception. Removing and reinstalling does not seem to fix the issue.
The reason we went with this approach in the modeling tools was that the performance of Visual Studio degrades as the number of projects increases. It is the least of the evils in the current scheme of things.
One of the things you should look at is the auditing capabilities built-in as they will forward all messages flowing through the system to a central queue – behind which you can put your monitoring service.