{"id":23080,"library":"edx-event-bus-redis","title":"edx-event-bus-redis","description":"Redis Streams implementation for the Open edX event bus. Provides classes like RedisEventBus to produce and consume events over Redis streams. Current version 1.0.0, requires Python >=3.12. Release cadence is irregular, driven by requirements maintenance and occasional breaking changes.","status":"active","version":"1.0.0","language":"python","source_language":"en","source_url":"https://github.com/openedx/event-bus-redis","tags":["openedx","event-bus","redis","streams","edx"],"install":[{"cmd":"pip install edx-event-bus-redis","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Alternative backend; often confused with Redis backend","package":"event-bus-kafka","optional":true},{"reason":"Required for Redis Streams connectivity","package":"redis","optional":false},{"reason":"Used for signal handling and settings integration, but not strictly required for core bus","package":"django","optional":true}],"imports":[{"note":"Standard import path.","symbol":"RedisEventBus","correct":"from edx_event_bus_redis import RedisEventBus"},{"note":"Submodule structure changed; direct import from package is correct.","wrong":"from edx_event_bus_redis.producer import RedisEventBus","symbol":"EventBusProducer","correct":"from edx.event_bus.redis import RedisEventBus"},{"note":"Common confusion: importing from the wrong backend package.","wrong":"from edx.event_bus.kafka import KafkaEventBus","symbol":"EventBusConsumer","correct":"from edx_event_bus_redis import RedisEventBus"}],"quickstart":{"code":"import os\nfrom edx_event_bus_redis import RedisEventBus\n\nredis_url = os.environ.get('REDIS_URL', 'redis://localhost:6379/0')\nbus = RedisEventBus(url=redis_url)\n\n# Produce an event\nbus.send('user.registered', {'user_id': 42, 'email': 'test@example.com'})\n\n# Consume events (blocking example)\nfor event in bus.consume(['user.registered']):\n    print(event)\n    break","lang":"python","description":"Minimal example: create a RedisEventBus, send an event, then consume from a stream."},"warnings":[{"fix":"Upgrade Python environment to 3.12 or later.","message":"v1.0.0 drops Python 3.11 support. Must use Python >=3.12.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Remove the signal argument from consumer calls.","message":"v0.3.0 removed the deprecated signal parameter from the consumer. Code relying on that parameter will break.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Verify REDIS_URL or default url points to a valid Redis instance.","message":"Ensure Redis is running and accessible at the configured URL. Misconfiguration leads to silent failures or ConnectionError.","severity":"gotcha","affected_versions":"all"},{"fix":"Use consistent stream names and group IDs across services.","message":"Event bus configuration must match between producer and consumer (stream names, consumer groups). Mismatch results in no events being consumed.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install edx-event-bus-redis","cause":"Package not installed or imported incorrectly.","error":"ModuleNotFoundError: No module named 'edx_event_bus_redis'"},{"fix":"Use: from edx_event_bus_redis import RedisEventBus","cause":"Attempting to import from a submodule instead of the package top level.","error":"AttributeError: module 'edx_event_bus_redis' has no attribute 'RedisEventBus'"},{"fix":"Start Redis: redis-server or set REDIS_URL to a valid endpoint.","cause":"Redis server is not running or unreachable.","error":"redis.exceptions.ConnectionError: Error 61 connecting to localhost:6379. Connection refused."},{"fix":"Remove the signal argument from consume() calls.","cause":"Code written for <0.3.0 passed signal parameter; removed in v0.3.0.","error":"TypeError: consume() got an unexpected keyword argument 'signal'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}