At the minute I'm trying to balance processing and throughput in a system where I need to ensure message order. The processing part basically involves a transformation and output to another service entity, e.g:
[1, 2, 4, 8] > {x2} > [2, 4, 8, 16]
At the moment I'm using ReceiveBatch and SendBatch in a single thread to ensure that the messages are output in the correct order. I'm wondering if I can simplify things by using the OnMessage/OnMessageAsync, however I suspect that because this works with a number of concurrent calls that I may end up with my outputs out-of-order. e.g.:
[1, 2, 4, 8] > {x2} > [2, 8, 16, 4]
Is this going to be the case?