def messenger_received_message(message_string)
      #puts "receive|#{message_string}"
      begin
        message = Messages.from_json(message_string)
      rescue ProtocolError
        @scheduler.receive(:invalid_message)
        return
      end
      case message
      when Messages::CallRequest then @scheduler.receive(:call_request_message, message)
      when Messages::CallResponse then @scheduler.receive(:call_response_message, message)
      when Messages::Compatibility then @scheduler.receive(:compatibility_message, message)
      when Messages::Forget then @scheduler.receive(:forget_message, message)
      when Messages::Initialization then @scheduler.receive(:initialization_message, message)
      when Messages::Shutdown then @scheduler.receive(:shutdown_message)
      end    
    end
def messenger_received_message(message_string)
      #puts "receive|#{message_string}"
      begin
        message = Messages.from_json(message_string)
      rescue ProtocolError
        @scheduler.receive(:invalid_message)
        return
      end
      case message
      when Messages::CallRequest then @scheduler.receive(:call_request_message, message)
      when Messages::CallResponse then @scheduler.receive(:call_response_message, message)
      when Messages::Compatibility then @scheduler.receive(:compatibility_message, message)
      when Messages::Forget then @scheduler.receive(:forget_message, message)
      when Messages::Initialization then @scheduler.receive(:initialization_message, message)
      when Messages::Shutdown then @scheduler.receive(:shutdown_message)
      end    
    end
Submit a message from the messenger.
 The thread will wait its turn if another event is being processed.
 @param message_string [String]
 @return [void]