Interface MessageCreatedStrategy


public interface MessageCreatedStrategy
A strategy that allows custom components to plugin and perform custom logic when Camel creates Message instance.

For example to populate the message with custom information that are component specific and not part of the JMS specification.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onMessageCreated(jakarta.jms.Message message, jakarta.jms.Session session, org.apache.camel.Exchange exchange, Throwable cause)
    Callback when the JMS message has just been created, which allows custom modifications afterwards.
  • Method Details

    • onMessageCreated

      void onMessageCreated(jakarta.jms.Message message, jakarta.jms.Session session, org.apache.camel.Exchange exchange, Throwable cause)
      Callback when the JMS message has just been created, which allows custom modifications afterwards.
      Parameters:
      session - the JMS session used to create the message
      exchange - the current exchange
      cause - optional exception occurred that should be sent as reply instead of a regular body