CorrelationDataProvider, as described here. This interface and its implementations provide you the means to populate the meta-data of a message based on the message that is currently being handled. For instance, you could use this to store the command that triggered the event in the metadata of the event itself, allowing you to track the cause of it.
MessageOriginProviderprovider out of the box, which adds a
correlation-idto all messages. The
trace-idis the same over all messages that are triggered because of the same origin, while
correlation-idcontains the message identifier of the previous message. We can see the effect of this in the following table.
LoggingInterceptoris rovided out-of-the-box solution to log any type of message to SLF4J, but also provides a simple overridable template to set up your own desired logging format.