This project shows how a queue processor could be built when all you are allowed to use is a database.
This is particularly likely when your software needs to run in an on-premise environment where you can't guarantee that you have access to a message bus.