List of usage examples for org.springframework.amqp.rabbit.connection SingleConnectionFactory destroy
@Override public final void destroy()
From source file:org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainerTests.java
@Test public void testLazyConsumerCount() throws Exception { final SingleConnectionFactory singleConnectionFactory = new SingleConnectionFactory("localhost"); SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(singleConnectionFactory) { @Override//from ww w.ja v a 2s .com protected void doStart() throws Exception { // do nothing } }; container.start(); assertEquals(1, ReflectionTestUtils.getField(container, "concurrentConsumers")); container.stop(); singleConnectionFactory.destroy(); }