title: Task Queues, Idempotence, and Objectify Transactions
body: <p>The <a href="https://developers.google.com/appengine/docs/java/taskqueue/#Java_Tasks_within_transactions" rel="nofollow noreferrer">documentation for GAE's Task Queue API</a> states:</p>
  
  <blockquote>
    <p>You can enqueue a task as part of a datastore transaction, such that the task is only enqueued—and guaranteed to be enqueued—if the transaction is committed successfully.</p>
  </blockquote>
  
  <p>However, the <a href="https://developers.google.com/appengine/docs/java/datastore/transactions" rel="nofollow noreferrer">documentation for datastore transactions</a> states twice that we should make them idempotent whenever possible, and submitting to a task queue is not idempotent.  The <a href="https://code.google.com/p/objectify-appengine/wiki/Transactions" rel="nofollow noreferrer">documentation for objectify</a> takes this a step further, explaining that <code>work MUST be idempotent</code> within its transactions.</p>
  
  <p>So, is there a standard way to handle combining these recommendations/requirements, or should I roll my own technique (perhaps using something like <a href="https://stackoverflow.com/questions/22362192">this</a>)?</p>