Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piyoki/redis-streams-example
https://github.com/piyoki/redis-streams-example
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/piyoki/redis-streams-example
- Owner: piyoki
- Created: 2023-12-09T10:37:11.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-12T08:46:00.000Z (about 1 year ago)
- Last Synced: 2024-10-14T07:36:13.134Z (3 months ago)
- Language: Python
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# redis-streams-example
## Table of Contents
* [Bootstrap](#bootstrap)
* [Spin up a local Redis instance](#spin-up-a-local-redis-instance)
* [Connect to Redis](#connect-to-redis)
* [Create a consumer group](#create-a-consumer-group)
* [Exec virtualenv](#exec-virtualenv)
* [Publish message](#publish-message)
* [Consume message](#consume-message)## Bootstrap
```bash
./install
```## Spin up a local Redis instance
```bash
cd docker
docker compose up -d
```## Connect to Redis
```bash
redis-cli -u redis://127.0.0.1:6379/0
```## Create a consumer group
```bash
XGROUP CREATE demo consumer_group 0 MKSTREAM
```## Exec virtualenv
```bash
. ./venv/bin/activate.fish
```## Publish message
```bash
python3 publisher.py
```## Consume message
```bash
python3 consumer.py
```