title: What is the most effective way to implement read/write process?
body: <p>I'm looking for the best solution for this process. C# code reads a huge number of messages from IBM MQ queue, processes them and sends enhanced messages to ElasticSearch API.</p>
  <p>The problem at the moment is that the time to process each message (there is no option for bulk operations) and send it to Elastic takes more time that fetch a message from IBM MQ.</p>
  <p>I tried to run it with multithreading, in parallel, also with pub/sub in C# with ConcurrentQueue but the best result I get is still running all the process in sequence  (read -&gt; enhance -&gt; send). But it is not good enough for me because there are more messages coming to IBM MQ than I can handle with this solution and eventually I have a lot of untaken messages in IBM MQ.</p>
  <p>What can be the better solution?</p>
  <p><a href="https://i.stack.imgur.com/98jAr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/98jAr.png" alt="enter image description here" /></a></p>