title: Processing data by multiple threads simultaneously
body: <p>We have an application that regularly receives multimedia messages, and should reply to them.</p>
  
  <p>We currently do this with a single thread, first receiving messages, and then processing them one by one. This does the job, but is slow. </p>
  
  <p>So we're now thinking of doing the same process but with multiple threads sumultaneously.</p>
  
  <p>Any simple way to allow parallel processing of the incoming records, yet avoid erroneously processing the same record by two threads?</p>