code: public static void setHeader(Message message, String name, String value) {
          if (name.equals(IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER)) {
              message.setHeader(IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER, Integer.valueOf(value));
          } else if (name.equals(IntegrationMessageHeaderAccessor.SEQUENCE_SIZE)) {
              message.setHeader(IntegrationMessageHeaderAccessor.SEQUENCE_SIZE, Integer.valueOf(value));
          } else if (name.equals(IntegrationMessageHeaderAccessor.PRIORITY)) {
              message.setHeader(IntegrationMessageHeaderAccessor.PRIORITY, Integer.valueOf(value));
          } else {
              message.setHeader(name, value);
          }
      }
docs: Safely sets header on message builder. Some headers need to be cast to specific type such
  as PRIORITY in {@link org.springframework.integration.IntegrationMessageHeaderAccessor}.
  @param message
  @param name
  @param value