spring-framework / org.springframework.jms.core / JmsMessageOperations / receiveAndConvert

receiveAndConvert

@Nullable abstract fun <T : Any> receiveAndConvert(destinationName: String, targetClass: Class<T>): T

Receive a message from the given destination and convert its payload to the specified target class.

Parameters

destinationName - the name of the target destination

targetClass - the target class to convert the payload to

Return
the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout