@Override public void findLatestWithCallback(Queryable filter, Sort sort, List<String> contentFields, long limit, DocumentCallbackHandler callbackHandler) { List<AggregationOperation> operations = latestLaunchesAggregationOperationsList(filter); operations.add(sort(sort)); operations.add(limit(limit)); DBObject results = mongoTemplate.aggregate(newAggregation(operations), mongoTemplate.getCollectionName(Launch.class), Launch.class) .getRawResults(); BasicDBList result = (BasicDBList) results.get(RESULT); result.stream().map(it -> (DBObject) it).forEach(callbackHandler::processDocument); }