Perhaps you use a staging environment but you want to run the retries with mocked data and/or in a different environment, or the other way around. This is possible by getting the queue id from the recorder and then conditioning your tests accordingly.
const recorder = require('codeceptjs').recorder;
const queueId = recorder.getQueueId();
Understanding the id:
1 = 1st run
2 = 2nd run, therefore the 1st retry
…