code: public static void copy(HttpMessage from, HttpMessage to) {
          to.setName(from.getName());
          to.setPayload(from.getPayload());
  
          from.getHeaders().entrySet()
                  .stream()
                  .filter(entry -> !entry.getKey().equals(MessageHeaders.ID) && !entry.getKey().equals(MessageHeaders.TIMESTAMP))
                  .forEach(entry -> to.header(entry.getKey(), entry.getValue()));
  
          from.getHeaderData().forEach(to::addHeaderData);
          from.getCookies().forEach(to::cookie);
      }
docs: Apply message settings to target http message.
  @param from
  @param to