Implementation of non-repetitive queues with redis

redis queue lpush rpush inserts the queue without judging the repetition, how to avoid inserting some repetitions?
redis has a collection that does not allow repetition. How can the two of them be implemented together?

Mar.11,2021

as you said, you can try to put your data in SET first. If you don't store it, it means that the data is in SET, so don't execute the push command.
otherwise, consider using lua to do the above, and then provide it to the caller as an instruction.


1. The data entered by set is orderly and non-repetitive, so there is no repetition
2. Delete the data in the collection after each successful execution
3. If the execution fails, store the failed data in another collection and use multiple threads to process Synchronize


list, first lrem and then push

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3153c-2bd78.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3153c-2bd78.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?