Backend for handling messages