Skip to content

Instantly share code, notes, and snippets.

View zamoosh's full-sized avatar
🌏
Working as a freelancer

Mohammad Rahimi zamoosh

🌏
Working as a freelancer
  • novinParva - codinto
  • Iran
View GitHub Profile
@zamoosh
zamoosh / readme.md
Last active May 19, 2025 18:41
Redis stream sample code

📌 What This Code Does

This Python script showcases a multi-threaded producer-consumer system using Redis Streams and consumer groups.

💡 Key Components:

  • Redis Streams: A log-like data structure in Redis, ideal for real-time data ingestion and processing.
  • Producer (writer): Continuously pushes randomized market data to a Redis stream.
  • Consumer (reader): Reads new entries from the stream via a consumer group, acknowledges processed items, and deletes them to avoid reprocessing.
  • Threading: Two threads are used to simulate concurrent real-world producer-consumer scenarios.