public class BatchingRabbitTemplate extends RabbitTemplate implements Lifecycle
RabbitTemplate that permits batching individual messages into a larger
message. All send() methods (except
send(String, String, org.springframework.amqp.core.Message,
org.springframework.amqp.rabbit.support.CorrelationData))
are eligible for batching.
Experimental - APIs may change.
RabbitTemplate.ConfirmCallback, RabbitTemplate.ReturnCallbacklogger| Constructor and Description |
|---|
BatchingRabbitTemplate(BatchingStrategy batchingStrategy,
TaskScheduler scheduler) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Flush any partial in-progress batches.
|
boolean |
isRunning() |
void |
send(String exchange,
String routingKey,
Message message,
CorrelationData correlationData) |
void |
start() |
void |
stop() |
convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertAndSend, convertMessageIfNecessary, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, correlationconvertAndSend, correlationConvertAndSend, doSend, doSendAndReceive, doSendAndReceiveWithFixed, doSendAndReceiveWithTemporary, execute, getMessageConverter, getUnconfirmed, getUUID, handleConfirm, handleReturn, initDefaultStrategies, isChannelLocallyTransacted, isConfirmListener, isReturnListener, onMessage, receive, receive, receiveAndConvert, receiveAndConvert, receiveAndReply, receiveAndReply, receiveAndReply, receiveAndReply, receiveAndReply, receiveAndReply, removePendingConfirmsReference, send, send, send, sendAndReceive, sendAndReceive, sendAndReceive, setAfterReceivePostProcessor, setBeanFactory, setBeforePublishPostProcessors, setConfirmCallback, setCorrelationKey, setEncoding, setExchange, setMandatory, setMandatoryExpression, setMessageConverter, setMessagePropertiesConverter, setQueue, setReceiveConnectionFactorySelectorExpression, setRecoveryCallback, setReplyQueue, setReplyTimeout, setRetryTemplate, setReturnCallback, setRoutingKey, setSendConnectionFactorySelectorExpressionafterPropertiesSet, convertRabbitAccessException, createConnection, getChannel, getConnection, getConnectionFactory, getTransactionalResourceHolder, isChannelTransacted, setChannelTransacted, setConnectionFactorypublic BatchingRabbitTemplate(BatchingStrategy batchingStrategy, TaskScheduler scheduler)
batchingStrategy - the batching strategy.scheduler - the scheduler.public void send(String exchange, String routingKey, Message message, CorrelationData correlationData) throws AmqpException
send in class RabbitTemplateAmqpExceptionpublic void flush()