private void testRequeueOrNotGuts(Exception ex, boolean expectedRequeue, Channel channel, BlockingQueueConsumer blockingQueueConsumer) throws Exception { DirectFieldAccessor dfa = new DirectFieldAccessor(blockingQueueConsumer); dfa.setPropertyValue("channel", channel); Set<Long> deliveryTags = new HashSet<Long>(); deliveryTags.add(1L); dfa.setPropertyValue("deliveryTags", deliveryTags); blockingQueueConsumer.rollbackOnExceptionIfNecessary(ex); verify(channel).basicNack(1L, true, expectedRequeue); }
consumer.rollbackOnExceptionIfNecessary(ex); consumer.rollbackOnExceptionIfNecessary(ex); throw ex;
consumer.rollbackOnExceptionIfNecessary(ex); consumer.rollbackOnExceptionIfNecessary(ex); throw ex;