public class BatchingRabbitTemplate extends RabbitTemplate implements org.springframework.context.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,
org.springframework.scheduling.TaskScheduler scheduler) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Flush any partial in-progress batches.
|
boolean |
isRunning() |
void |
send(java.lang.String exchange,
java.lang.String routingKey,
org.springframework.amqp.core.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, org.springframework.scheduling.TaskScheduler scheduler)
batchingStrategy - the batching strategy.scheduler - the scheduler.public void send(java.lang.String exchange,
java.lang.String routingKey,
org.springframework.amqp.core.Message message,
CorrelationData correlationData)
throws org.springframework.amqp.AmqpException
send in class RabbitTemplateorg.springframework.amqp.AmqpExceptionpublic void flush()
public void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecycle