BrokerMessage: correct message parsing logic