I need to process 2 million messages per second (perhaps in a scale out configuration) and route each message to a N delegates or multicast delegates.
How should I structure my application in C# so that I can achieve the best performance when receiving the message, and routing it to the correct delegate?
Each inbound message has the following properties in the format of a JSON array:
Each message will be processed by a delagate function that is interested one or more of those properties.
Simple examples of delegate processing needed:
- A customer counter function may count the quantity of messages per customer,
- A category counter may count the quantity of messages that counter
- A customer-counter will count messages unique to that customer.