api for messageing system with threads