in this case you will have to build some custom logic where you check in the triggered service if this is a duplicate or not.
When it is a duplicate, you can republish the document to your queue where it will be queued at the end of the queue.
Before this document can be processed again all other documents in the queue will be processed then.
When it is processed again, you need to check if this is first occurance of the duplicate (-> publish) or second (-> process).
Please have a look at the IS Built-In Services Reference as you might find some helpful services here (i.e the folders pub.cache and pub.storage)