CAMEL-3655: Refactored having reusable code in file consumer to support both scheduled consumer and polling consumer.