while (manager != null) {
FiniteDuration duration = Duration.create(
60, TimeUnit.SECONDS);
streamRequestToManager streamRequest = new streamRequestToManager(0);
Future<Object> futureResponse = Patterns.ask(manager, streamRequest, new Timeout(duration));
System.out.println(manager.path().address().toString());
try {
BatchResponseFromManager partResponse = (BatchResponseFromManager) Await.result(futureResponse, duration);
while (partResponse.getResponseMap().size() > 0) {
collectResult(response, partResponse);