Explain how you would implement a custom hashing function to manage unique identifiers in a high-throughput queue.