Interface BatchMessageFormat
public interface BatchMessageFormat
Interface for defining batch message formats for different binders.
-
Method Summary
Modifier and TypeMethodDescriptionThe type of the binder.getBatchHeaders(org.springframework.messaging.Message<?> batchMessage) Get the set of headers from a batch message.getBatchPayloads(org.springframework.messaging.Message<?> batchMessage) Get the set of payloads from a batch message.voidsetBatchHeaders(org.springframework.messaging.support.MessageHeaderAccessor headerAccessor, List<Map<String, Object>> batchHeaders) Set the batch headers on the provided header accessor.
-
Method Details
-
binderType
String binderType()The type of the binder.- Returns:
- the binder type
-
getBatchPayloads
Get the set of payloads from a batch message. The list index corresponds to the order of the messages in the batch.- Parameters:
batchMessage- the batch message containing the payloads- Returns:
- the list of payloads
-
getBatchHeaders
Get the set of headers from a batch message. The list index corresponds to the order of the messages in the batch.- Parameters:
batchMessage- the batch message containing the headers- Returns:
- the list of set of headers
-
setBatchHeaders
void setBatchHeaders(org.springframework.messaging.support.MessageHeaderAccessor headerAccessor, @Nullable List<Map<String, Object>> batchHeaders) Set the batch headers on the provided header accessor.- Parameters:
headerAccessor- the header accessor to set the headers onbatchHeaders- the list of headers to set, or null if not available
-