threading and inbound message handling