We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf4c10a commit 68e98eeCopy full SHA for 68e98ee
format/metadatacopy.go
@@ -66,8 +66,12 @@ func (format *MetadataCopy) Configure(conf core.PluginConfigReader) {
66
func (format *MetadataCopy) ApplyFormatter(msg *core.Message) error {
67
meta := msg.GetMetadata()
68
data := format.GetAppliedContent(msg)
69
+ pool := core.MessageDataPool
70
+
71
for _, key := range format.metaDataKeys {
- meta.SetValue(key, data)
72
+ bufferCopy := pool.Get(len(data))
73
+ copy(bufferCopy, data)
74
+ meta.SetValue(key, bufferCopy)
75
}
76
return nil
77
0 commit comments