List of usage examples for org.springframework.amqp.core AmqpTemplate convertAndSend
void convertAndSend(Object message) throws AmqpException;
From source file:acromusashi.stream.component.rabbitmq.DefaultRabbitmqClient.java
/** * ??//w w w .j av a 2s. co m * * @param template ??? * @param message * @throws InterruptedException ????? */ private void sendAndRetry(AmqpTemplate template, Object message) throws InterruptedException { try { template.convertAndSend(message); } catch (AmqpException ex) { Thread.sleep(getRetryInterval()); template.convertAndSend(message); } }