List of usage examples for org.springframework.amqp.core AmqpTemplate receiveAndConvert
@Nullable
Object receiveAndConvert() throws AmqpException;
From source file:acromusashi.stream.component.rabbitmq.DefaultRabbitmqClient.java
/** * ??/*from www. jav a 2 s. c o m*/ * * @param template ??? * @return * @throws InterruptedException ????? */ private Object receiveAndRetry(AmqpTemplate template) throws InterruptedException { Object message = null; try { message = template.receiveAndConvert(); } catch (AmqpException ex) { // ???????????1?? // ???????? Thread.sleep(getRetryInterval()); message = template.receiveAndConvert(); } return message; }