Reputation: 1520
I have a simple NServiceBus architecture where a number of slave services periodically report to a single master.
However, the master isn't able to process the messages fast enough - they're stacking up in the MSMQ unprocessed.
What options do I have for speeding up message processing at the master?
Upvotes: 3
Views: 289
Reputation: 2314
The speed of a single endpoint is influenced by the following factors: number of message processing threads, underlying hardware (mostly disk and CPU bound), the chosen transport (some transports are faster than others), the transactional level, the involvement of the DTC or not, the underlying saga or persistence storage (ravendb, sql...), your chosen database or IO bound operations invoked in the handler, your chosen IoC and ultimately your business logic/design of the handler code.
So those are the options you have to consider. You can now try to tweak with vertical scaling by adding more threads on the endpoint and more capable hardware (i.ex. SSD) or as john mentioned horizontal scaling by adding more machines to the game and ultimately the distributer of you chose MSMQ. BUT depending on your non-functional requirements you also need to think about the underlying infrastructure. For example can you sacrifice transactional guarantees for more performance? If the answer is yes then you can tweak the transactional level and disable the DTC. Or even more exchange the transport with a more performant one. You see this is a lot to think about but without having more information about your non-functional requirements and SLAs I have to stick to this generic answer.
Upvotes: 3