Implement producer/consumer for aggregating data