-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
@Override
public void put(String key, String value) {
headers.add(key, value.getBytes(StandardCharsets.UTF_8));
}This just appends headers to the end of the list, and inject can happen repeatedly in processing a message. With baggage, this can result it a lot of repeated data.
We could instead headers.remove(key).add(key, value.getBytes(StandardCharsets.UTF_8)); which trades an iteration over all headers and potential arraylist removals for each key.
Metadata
Metadata
Assignees
Labels
No labels