I guess using an auto-incrementing integer ID is fine, but you could also reduce some logic by using a hash that is based on the event and/or message.