The examples in this directory will demonstrate different patterns and features of goka.
All examples are runnable out of the box. All you need to do is start Kafka and Zookeeper locally. Just run
make start
# or
make restart # if it was started already and you need fresh instances.
This will start the docker containers and configure kafka to auto-create the topics.
This is a very simple toy application that demonstrates how to
- use an Emitter
- use a Processor
- run a View to print the group table's values
Similar to the first example, Emitter, Processor and View are demonstrated here. In Addition it shows how to
- access the View using a web endpoint
- use a Codecs
The following examples show the combination of multiple processors, views, etc.
By generating a random folder for storage, this example can be executed in parallel multiple times to get a feeling for the rebalancing that's happening under the hood.
[Example]https://github.com/lovoo/goka/tree/master/examples/5-multiple/)
Shows how to use the monitoring- and query-interface of goka.
Shows how to (unit-)test programs using goka.
Demonstrates the rather new context function to defer (postpone) the commit of a callback.