The code below forms part of a websocket that connects to a third party API and receives messages quite frequently from it, currently there are about 3 messages that all app