Use metadata slice

Take a slice of the metadata if not using composite metadata to allow
reading it multiple times. For composite metadata this is not an isuse
as it is ensured by the underlying RSocket Java API.
This commit is contained in:
Rossen Stoyanchev
2019-09-23 13:32:28 +01:00
parent 0ae7154518
commit e2baf7277b
2 changed files with 45 additions and 1 deletions

View File

@@ -116,7 +116,7 @@ public class DefaultMetadataExtractor implements MetadataExtractor, MetadataExtr
}
}
else {
extractEntry(payload.metadata(), metadataMimeType.toString(), result);
extractEntry(payload.metadata().slice(), metadataMimeType.toString(), result);
}
return result;
}