Idea: in the queue-stored user metadata, store Vec<Range | String>, where Range means “reuse a data range from the source message” and String “use this constant data”.
Then, when re-emitting the message, this will allow sending changed data.
The point of this scheme compared to just editing the message directly on-disk is, it works well when there are multiple recipients that each need their own changes, in that it avoids copying the whole message for each recipient (though, in exchange, it does have to store the constant data for each recipient, which means that when the message should be modified in the same way for many recipients it may end up consuming more disk space).
Idea: in the queue-stored user metadata, store
Vec<Range | String>
, whereRange
means “reuse a data range from the source message” andString
“use this constant data”.Then, when re-emitting the message, this will allow sending changed data.
The point of this scheme compared to just editing the message directly on-disk is, it works well when there are multiple recipients that each need their own changes, in that it avoids copying the whole message for each recipient (though, in exchange, it does have to store the constant data for each recipient, which means that when the message should be modified in the same way for many recipients it may end up consuming more disk space).