I have a consumer application which I would like to speed up. Most of the time consumer is waiting for http response from the third party system hence I cannot proceed with other messages in queue and lag increases. What would be a recommended way to improve performance in such cases. My ideas:
- Create multiple consumers on separate threads
- Consume a batch of messages, run Parallel.ForEach to process them and then commit. But then what to do if one the messages in batch fails during the processing?