In partitions, messages are assigned a unique ID number called the offset. The role is to identify each message in the partition uniquely.