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

fromMessage

static fun <T : Any> fromMessage(message: Message<T>): MessageBuilder<T>

Create a builder for a new Message instance pre-populated with all of the headers copied from the provided message. The payload of the provided Message will also be used as the payload for the new message.

Parameters

message - the Message from which the payload and all headers will be copied