diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 41 |
1 files changed, 3 insertions, 38 deletions
@@ -1,56 +1,21 @@ ### Dependencies -Paths are hardcoded. Be aware the project will only work with this OpenDC as there are hidden Maven dependencies. Kafka topic should be named `postgres_topic`. Confluent local (see https://www.confluent.io/installation/): -```bash -export CONFLUENT_HOME=/opt/confluent -export PATH=/opt/confluent/bin:$PATH -cd /opt/confluent -kafka-storage random-uuid -kafka-storage format -t 2vi2WtHxQAOPyXb1Bj1Jvw -c $CONFLUENT_HOME/etc/kafka/server.properties --standalone -kafka-server-start $CONFLUENT_HOME/etc/kafka/server.properties -schema-registry-start $CONFLUENT_HOME/etc/schema-registry/schema-registry.properties -connect-standalone $CONFLUENT_HOME/etc/kafka/connect-standalone.properties $CONFLUENT_HOME/share/confluent-common/connectors/sink-jdbc.properties -``` +PostgreSQL (see https://www.postgresql.org/) Confluent JDBC sink and source (includes Postgres connector) (see https://www.confluent.io/hub/confluentinc/kafka-connect-jdbc) Be mindful to configure the right `plugin.path` in `etc/kafka/connect-standalone.properties` -```bash -ln -s /home/matt/git/opendc/resources/experiments/sink-jdbc.properties /opt/confluent/share/confluent-common/connectors -``` - -Protobuf: -extra/protobuf 33.1-3 +Protobuf (see https://archlinux.org/packages/extra/x86_64/protobuf/) You need to run this each time you change `schema.proto` ```bash cd resources/experiments/ protoc --java_out=/home/matt/git/opendc/opendc-common/src/main/java/ schema.proto curl -X DELETE http://localhost:8081/subjects/postgres-topic-value -``` - -Postgresql: - -extra/postgresql 18.1-2 - -```bash -initdb -D /var/lib/postgres/data -mkdir /run/postgresql/ -cd /run/postgresql/ -touch .s.PGSQL.5432.lock -chown -R postgres:postgres /run/postgresql -``` - -Random -```bash -bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic postgres_topic -bin/kafka-topics.sh --create --topic postgres_topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1 -bin/kafka-topics.sh --list --bootstrap-server localhost:9092 -bin/kafka-console-consumer.sh --bootstrap-server :9092 --topic postgres_topic --from-beginning -``` +```
\ No newline at end of file |
