}
});
Executors.newSingleThreadExecutor().execute(new Runnable() {
@Override
public void run() {
template.convertAndSend(ROUTE, (Object) "message", new CorrelationData("abc"));
template.convertAndSend(ROUTE, (Object) "message", new CorrelationData("def"));
first2SentOnThread1Latch.countDown();
}
});
Executors.newSingleThreadExecutor().execute(new Runnable() {
@Override
public void run() {
try {
startedProcessingMultiAcksLatch.await();
template.convertAndSend(ROUTE, (Object) "message", new CorrelationData("ghi"));
allSentLatch.countDown();
}
catch (InterruptedException e) {
e.printStackTrace();
}