CodeEngine
CodeEngine copied to clipboard
Kafka Observer Sample Pattern
This introduces a Kafka Observer Pattern for consumes a stream of messages from Kafka.
A so called Observer entity is provided, this Observer has the task to consume messages from multiple Kafka Topics and wake-up the so called Consumers whenever new messages arrived.
Consumers are the second entity in this sample. They will consume messages from a particular Kafka Topic after being wake-up by the Observer. Note that users might bring their own Consumer Kafka Clients code. In this example, a Consumer client written in go is provided. Consumers will gracefully shut-down after one minute, if no new messages are coming through the stream.
A comprehensive README is provided, on how to use this sample.