refactored the streaming consumer and provided two patterns for consuming messages (observer and actor)