Top Description Methods
org.springframework.jms.core

public Interface MessagePostProcessor

Annotations
@FunctionalInterface
Imports
jakarta.jms.JMSException, .Message

To be used with JmsTemplate's send method that converts an object to a message.

This allows for further modification of the message after it has been processed by the converter and is useful for setting JMS headers and properties.

Often implemented as a lambda expression or as an anonymous inner class.

Author
Mark Pollack
Since
1.1
See Also
JmsTemplate#convertAndSend(String, Object, MessagePostProcessor), JmsTemplate#convertAndSend(jakarta.jms.Destination, Object, MessagePostProcessor), org.springframework.jms.support.converter.MessageConverter

Method Summary

Modifier and TypeMethod and Description
public Message

Returns:

a post-processed variant of the message, or simply the incoming message; never null
postProcessMessage
(Message
the JMS message from the MessageConverter
message
)

Process the given message.

Method Detail

postProcessMessageback to summary
public Message postProcessMessage(Message message) throws JMSException

Process the given message.

The returned message is typically a modified version of the original.

Parameters
message:Message

the JMS message from the MessageConverter

Returns:Message

a post-processed variant of the message, or simply the incoming message; never null

Exceptions
JMSException:
if thrown by JMS API methods