code: def received(self, data):
          
          self.logger.debug('Data received: {}'.format(data))
  
          message_type = None
  
          if 'type' in data:
              message_type = data['type']
  
          if message_type == 'confirm_subscription':
              self._subscribed()
          elif message_type == 'reject_subscription':
              self._rejected()
          elif self.receive_callback is not None and 'message' in data:
              self.receive_callback(data['message'])
          else:
              self.logger.warning('Message type unknown. ({})'.format(message_type))
docs: API for the connection to forward
          information to this subscription instance.
  
          :param data: The JSON data which was received.
          :type data: Message