I am developing a jboss Java EE application where I need to send messages through a messaging system (JMS or AMQP optional). Approx. there will be around 10k to 15k messages per second. The requirement is to generate a unique id for each outgoing message that is not used any time in the past, even after application restart i.e. the id should not repeat again through the application lifetime (from day 1 of application use until decommissioned)
I will prefer solutions based on
- Numeric value only (what data type?)
- String
The auto-generation of the id should be atomic.