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 TypeMethodDescriptionvoid
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:
exchange
- the current exchangesession
- the JMS session used to create the messagecause
- optional exception occurred that should be sent as reply instead of a regular body
-