151152153154155156157158159160161
} catch (Exception e) { e.printStackTrace(); } finally { container1.stop(); container1.destroy(); container1 = null; brokerService1.stop(); brokerService1 = null; brokerService2.stop();
168169170171172173174175176177178
System.out.println("concurrent consumer count: " + container2.getConcurrentConsumers()); Thread.sleep(1000); } cachingConnectionFactory.destroy(); container2.destroy(); } catch (final Throwable t) { t.printStackTrace(); } return null; }
136137138139140141142143144145146
messageListenerContainer.start(); countDownLatch.await(); messageListenerContainer.stop(); messageListenerContainer.destroy(); assertFalse("no message has redelivery > 1", messageRedelivered.get()); } private class ValueHolder<T> {
142143144145146147148149150151152
while(!latch.await(1, TimeUnit.SECONDS) && count++ < 20) { System.out.println("count " + latch.getCount()); } container.destroy(); } finally { try { if(brokerService1 != null) { brokerService1.stop(); }} catch(Throwable t) { t.printStackTrace(); }
113114115116117118119120121122123
Assert.assertEquals(NUM_MESSAGE_TO_SEND, messageCount.get()); } finally { container1.stop(); container1.destroy(); container1 = null; brokerService1.stop(); brokerService1 = null; }
163164165166167168169170171172173
Assert.assertEquals(MAX_PRODUCERS * NUM_MESSAGE_TO_SEND, messageCount.get()); } finally { container1.stop(); container1.destroy(); container1 = null; brokerService1.stop(); brokerService1 = null; brokerService2.stop();
219220221222223224225226227228229
container1.stop(); container1.destroy(); container1 = null; container2.stop(); container2.destroy(); container2 = null; brokerService1.stop(); brokerService1 = null; brokerService2.stop();
149150151152153154155156157158159
9293949596979899100101102
executor.shutdown(); // Thread.sleep(30000); Assert.assertEquals(TOTAL_MESSAGES, messageCount.get()); } finally { container1.stop(); container1.destroy(); container1 = null; brokerService1.stop(); brokerService1 = null; } }
9596979899100101102103104105