title: Changing the headers and body of a RabbitMQ message when retrying it?
body: <p>I've seen blog posts, as well as answer #2 from this SO question <a href="https://stackoverflow.com/questions/23158310/how-do-i-set-a-number-of-retry-attempts-in-rabbitmq/23161921#23161921">How do I set a number of retry attempts in RabbitMQ?</a> recommending that one way to keep track of the retry count on a RabbitMQ message is to publish it again with an <code>x-redelivered-count</code> header.</p>
  
  <p>Is this done by setting the header on a message as it's headed to the dead-letter exchange, or is it done by making a fresh copy of the message with the same headers and body as before, but plus an incremented <code>x-redelivered-count</code> (while ACKing the old copy of the message?), and if it can be done with the former, how would I edit the headers or body of a message before it is dead-lettered?</p>