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(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, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, convertSendAndReceive, correlationconvertAndSend, correlationConvertAndSend, doReceive, doReceiveNoWait, doSend, doSendAndReceive, doSendAndReceiveWithFixed, doSendAndReceiveWithTemporary, execute, expectedQueueNames, 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, sendAndReceive, sendAndReceive, sendAndReceive, setAfterReceivePostProcessor, setAfterReceivePostProcessors, setBeanFactory, setBeforePublishPostProcessors, setConfirmCallback, setCorrelationKey, setEncoding, setExchange, setMandatory, setMandatoryExpression, setMessageConverter, setMessagePropertiesConverter, setQueue, setReceiveConnectionFactorySelectorExpression, setReceiveTimeout, setRecoveryCallback, setReplyAddress, 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(String exchange, String routingKey, Message message, CorrelationData correlationData) throws AmqpException
send in class RabbitTemplateAmqpExceptionpublic 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