A helper function to extract objects (messages) of a specific type from the pipeline and process them separately, one-by-one.