#!/bin/bash doas su postgres # In this project we only use the ``opendc'' database. psql -d opendc # Queries # Selects everything from the topic which Kafka writes to. SELECT * FROM postgres_topic; # Redis CLI # Connect to Redis redis-cli -h localhost -p 6379 # Very useful tutorial https://redis.io/docs/latest/develop/data-types/streams/ # https://redis.io/docs/latest/develop/tools/cli/ # Returns all items in the Redis stream XRANGE postgres_topic - + XTRIM postgres_topic MAXLEN 0 # https://codesignal.com/learn/courses/mastering-redis-for-high-performance-applications-with-java-and-jedis-1/lessons/redis-streams-with-java