Adds retrieve function to stream ingestion worker