public interface BatchingStrategy
Experimental - APIs may change.
| Modifier and Type | Method and Description |
|---|---|
MessageBatch |
addToBatch(java.lang.String exchange,
java.lang.String routingKey,
org.springframework.amqp.core.Message message)
Add a message to the batch and optionally release the batch.
|
default boolean |
canDebatch(org.springframework.amqp.core.MessageProperties properties)
Return true if this strategy can decode a batch of messages from a message body.
|
default void |
deBatch(org.springframework.amqp.core.Message message,
java.util.function.Consumer<org.springframework.amqp.core.Message> fragmentConsumer)
Decode a message into fragments.
|
java.util.Date |
nextRelease() |
java.util.Collection<MessageBatch> |
releaseBatches()
Release batch(es), perhaps due to a timeout.
|
MessageBatch addToBatch(java.lang.String exchange, java.lang.String routingKey, org.springframework.amqp.core.Message message)
exchange - The exchange.routingKey - The routing key.message - The message.MessageBatch), or null if not ready to release.java.util.Date nextRelease()
java.util.Collection<MessageBatch> releaseBatches()
default boolean canDebatch(org.springframework.amqp.core.MessageProperties properties)
deBatch(Message, Consumer).properties - the message properties.deBatch(Message, Consumer)default void deBatch(org.springframework.amqp.core.Message message,
java.util.function.Consumer<org.springframework.amqp.core.Message> fragmentConsumer)
message - the message.fragmentConsumer - a consumer for fragments.canDebatch(MessageProperties)