Interface MessagePostProcessor

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MessagePostProcessor
Post-processes a Message. This is the JMS equivalent of the spring-messaging MessagePostProcessor.

This is involved right before a JmsClient sends a message over the wire, for setting additional JMS properties and headers. With JmsTemplate, the message post processor is only involved in methods accepting it as an argument, to customize the outgoing message produced by a MessageConverter.

Since:
1.1
Author:
Mark Pollack
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.jms.Message
    postProcessMessage(jakarta.jms.Message message)
    Process the given message.
  • Method Details

    • postProcessMessage

      jakarta.jms.Message postProcessMessage(jakarta.jms.Message message) throws jakarta.jms.JMSException
      Process the given message.

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

      Parameters:
      message - the JMS message from the MessageConverter
      Returns:
      a post-processed variant of the message, or simply the incoming message; never null
      Throws:
      jakarta.jms.JMSException - if thrown by JMS API methods