Before a revamped implementation of querying was added to the event bus proper, this repository made use of Kafka Connect to persist events sent to Kafka by the event bus into Couchbase for later querying.
Deprecated: This repository is no longer in use, please review the project-and-dissertation
project for currently in-use repositories.
Follow the below steps to set up the persistence.
- Ensure you have Kafka running from the core repository.
- Run
docker-compose up
- Set up Couchbase:
http://localhost:8091
- Use the following details:- Cluster Name:
couchbase.db
- User:
connect
- Pass:
connect
- Accept license terms. - Go to advanced options and for server name entercouchbase.db
. - You may have to change some memory reservation sizes etc.
- Once logged in to the main GUI console, go to buckets and create bucket called
events
.
- Cluster Name:
- Reboot connect
docker-compose restart connect
- Tail logs, check for any errors
docker-compose logs -f
- Install kt and produce an event:
echo '{ "key": "HelloEvent1234123", "value": "MyWeirdEvent", "partition": 0 }' | kt produce -topic events -brokers kafka:9092 -timeout 1s
- You may have to add
127.0.0.1 kafka
to your /etc/hosts file.
- Check the Couchbase bucket documents to see if the event has been persisted.