KB Article #176823
coreID : what is the syntax ?
Problem
-- how B2Bi / Interchange generates the attribute coreID-- is it unique, is there a risk to have duplicates coreIDs ?
Resolution
* the syntax for the coreID is : ci<epoch timestamp>.<counter>@<hostname>_teEx : ci1374825665712.2663777@machine1_te
- ci : a general prefix where the views whether this is a label for “Core Id” or going back to the old product name "Cyclone Interchange“
- <epoch timestamp> : the time of message consumption by Interchange in a standardized ms timestamp format based on “epoch” day 1 = 1970-01-01
See also http://www.epochconverter.com/
- <counter> : That counter is global per JVM, it's getting incremented on each call to our GUIDGenerator. If the JVM is stopped, then it starts again from 1
Note : The GUIDGenerator is not only used for messages. It's used anywhere in the product where we require an unique id (example: alerts, events, internal entity manager ids for the persistence layer, message ids,...).
- <hostname> : the name of the B2Bi host where the message was consumed
* Since the coreid contains a timestamp + the node id + the counter, then the ID is guaranteed to be globally unique across the cluster
* BUT if the time on the machine gets changed sometime in the past and the JVM gets restarted (so the counter resets as well), we may have duplicate coreIDs. which can lead to DB constraint violation since we have an unique index on the CoreID column.