code: public <Metadata> Message<Payload> add(MetadataKey<Metadata> key, Metadata metadata) {
      return new Message<>(payload, metadataMap.plus(key, metadata));
    }
docs: Add a metadata key and value to this message.
  
  @param key The key to add.
  @param metadata The metadata to add.
  @return A copy of this message with the key and value added.