Removed duplicated code from GenericConsumer and replaced with a method call