blob: 8ff604e21ef5406ffc8862dd2c54194a8394bde0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/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
|