code: private MessageType getMessageType(Message response) {
          String messageTypeString = (String) response.getHeader(MessageHeaders.MESSAGE_TYPE);
          if (MessageType.knows(messageTypeString)){
              return MessageType.valueOf(messageTypeString.toUpperCase());
          }
          return null;
      }
docs: Determines the MessageType of the given response
  @param response The response to get the message type from
  @return The MessageType of the response