title: How to reliably process a list of items using a source list
body: <p>Say you need to send out a newsletter.
  You have a master list of emails stored in either a list or set (whatever makes sense).</p>
  
  <pre><code>List/Set
  "user1@example.com"
  "user2@example.com"
  </code></pre>
  
  <p>You have may have multiple newsletters being sent out using the same list, so you can't modify the original master list.</p>
  
  <p>In pseudo code I was thinking of this:</p>
  
  <ol>
  <li>get x elements, push to "in_progress_123" </li>
  <li>when consumers are finished processing (success or failure), push to list "completed_123"</li>
  <li>continue #1 until lists are identical</li>
  <li>if my server crashes and restarts, it can just continue back to #1</li>
  </ol>
  
  <p>I need a master list, and an "in_progress" list because there can be multiple newsletters being sent out using the same master list.</p>
  
  <p>(note:  I will handle the case of fixing the failure items, but not important for now)</p>
  
  <p>Is this possible with redis?</p>
  
  <p>Maybe I need a combination of both list and sorted sets, but I can't figure out how to do this.  I like RPOPLPUSH but that is for lists, and I need a way to compare lists but that is in sets.</p>