Updated communication broker with thread state machines