You can pass all configuration headers to override the configuration of the original message.For example, if the retry count of the original message is 5, you can set it to 0 for the retried message by passing
Upstash-Retries: 0 header to this request.
Check out publish documentation for complete list of configuration options you can pass.