This is a queue-based id generator for static set of shards.