long processed = 0;
Set<String> streamNames = Sets.newHashSet();
Set<ImmutablePair<String, String>> queueNameContexts = Sets.newHashSet();
while (scanner.hasNext()) {
AggregatesScanResult scanResult = scanner.next();
processed += scanResult.getValue();
// tag is of the form input.[queueURI]. ex: input.queue://PurchaseFlow/reader/queue
String tag = scanResult.getTag();
// strip the preceding "input." from the tag.
QueueName queueName = QueueName.from(URI.create(tag.substring(6, tag.length())));
if (queueName.isStream()) {
streamNames.add(queueName.getSimpleName());
} else if (queueName.isQueue()) {