https://github.com/abhirockzz/kafka-javaee-concurrency-utilities
kafEEne: Kafka + Java EE Concurrency Utilities
https://github.com/abhirockzz/kafka-javaee-concurrency-utilities
concurrency docker docker-compose javaee kafeene kafka
Last synced: about 1 year ago
JSON representation
kafEEne: Kafka + Java EE Concurrency Utilities
- Host: GitHub
- URL: https://github.com/abhirockzz/kafka-javaee-concurrency-utilities
- Owner: abhirockzz
- License: mit
- Created: 2017-05-30T18:01:48.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T13:34:52.000Z (about 9 years ago)
- Last Synced: 2025-03-24T00:24:57.194Z (over 1 year ago)
- Topics: concurrency, docker, docker-compose, javaee, kafeene, kafka
- Language: Java
- Homepage: https://abhirockzz.wordpress.com/2017/06/01/kafeene-2-kafka-concurrency-utilities/
- Size: 9.77 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Check [the blog](https://abhirockzz.wordpress.com/2017/05/30/kafeene-2-kafka-concurrency-utilities) for more details
## Start with Docker Compose
- `git clone https://github.com/abhirockzz/kafka-javaee-concurrency-utilities.git`
- `mvn clean install` - creates `kafka-concurrency-utils` in `target` directory
- `docker-compose up --build` - starts Kafka, Zookeeper, Payara and Producer containers (you can switch to any other [Java EE runtime](https://github.com/abhirockzz/kafka-javaee-concurrency-utilities/blob/master/Dockerfile#L1))
## Results

The results you'll see might be similar to this. Here is the gist. The above snapshot shows data from three (consumer) poll loops
- Producer pushed one record
- Each loop fetched 1 record (that's just co-incidence, not by design) and its completely independent of the producer
- After each loop (task), the offset commit process got triggered - in this example we have 3 partitions and the offset for each partition is printed to the console
- If you notice carefully, the committed offset (for a particular loop) will be in line with the data which was consumed (note: committed offset points to the next offset i.e. one more than the offset that offset which was last consumed)
## bye-bye
`docker-compose down -v` once you're done....