Context:
RTO AWS AP-SOUTHEAST-1
V1 Machine ID
EMA Java (recent versions) + User Dispatch mode
Application: ex130_MP_UserDisp + ex410_MP_HorizontalScaling
Content: Nasdaq Basic MP, Nasdaq TotalView MBP
Problem:
To maximum the performance (e.g., leverage the multi-core CPU) / avoid the slow consumer issue, given the network and CPU are not identified as bottleneck, it goes to the question how many L2 MBP messages can be processed at the US trading hours opening time, with single consumer.
Considering the example ex130_MP_UserDisp / ex410_MP_HorizontalScaling, under EMA User Dispatch mode, if we can only have one machine id (so that means we can only instantiate one consumer), then we create multiple threads with the following logic:
void ConsumerManager::run()
{
while ( running)
{
ommConsumer→dispatch(1000);
}
}
Question:
1. Will the dispatch running in threads will cause the message processing interleaved with each other?
2. How to maintain (or even sort it out at a later downstream queue processing) the order in such case, the recommendation? e.g., through some sequence number or timestamp fields to identify the orders of L1 MP and L2 MBP messages respectively.