Interface CorrelationStrategy
- All Known Implementing Classes:
ExpressionEvaluatingCorrelationStrategy
,HeaderAttributeCorrelationStrategy
,MethodInvokingCorrelationStrategy
- 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 CorrelationStrategy
Strategy for determining how messages can be correlated. Implementations
should return the correlation key value associated with a particular message.
-
Method Summary
Modifier and Type Method Description java.lang.Object
getCorrelationKey(org.springframework.messaging.Message<?> message)
Find the correlation key for the given message.
-
Method Details
-
getCorrelationKey
java.lang.Object getCorrelationKey(org.springframework.messaging.Message<?> message)Find the correlation key for the given message. If no key can be determined the strategy should not returnnull
, but throw an exception.- Parameters:
message
- The message.- Returns:
- The correlation key.
-