If you do need consecutive IDs, use atomic operations on a counter (compare-and-swap type increments, AtomicInt in Java, etc). Need to preserve them after a restart? Reserve a block of size N, when you get close to N, stop generating until you've persisted the reservation for the next N identifiers. Atomic increments will ensure you never hand out the same number twice, and reserving a block before you persist will ensure that you'll be save even after a power outage or whatever.
Why bother with incredibly long random numbers? It can go wrong in so many ways. The probability of duplicates being low does not mean that you won't get duplicates.