check for unique key with messages