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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onMessageCreated​(javax.jms.Message message, javax.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 Detail

      • onMessageCreated

        void onMessageCreated​(javax.jms.Message message,
                              javax.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:
        exchange - the current exchange
        session - the JMS session used to create the message
        cause - optional exception occurred that should be sent as reply instead of a regular body