spring-framework / org.springframework.messaging.support / MessageBuilder / copyHeaders

copyHeaders

fun copyHeaders(@Nullable headersToCopy: MutableMap<String, *>): MessageBuilder<T>

Copy the name-value pairs from the provided Map. This operation will overwrite any existing values. Use { #copyHeadersIfAbsent(Map) to avoid overwriting values. Note that the 'id' and 'timestamp' header values will never be overwritten.