openedx / openedx/openedx-events

[Consumer] [Discovery] Automatic retries and dead-letter-queue for event bus

Open
#237 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

event-bus
Dominant language
Python
Stars
13
Forks
33
Avg merge
14h 37m
Merged PRs (30d)
4

Description

Automatic retries and DLQs (dead letter queues) are often available for different eventing tools.

This does not come as a built-in feature for Kafka (not sure about Redis Streams).

Current workarounds:

  1. Replaying idempotent events from the time of the first occurrence of any issue. (Tested with Kafka)
  2. Spinning off a celery task that has retry capabilities built-in. (Unused, but possible. Has downside of involving celery.)

A variety of blogs can be found using additional Kafka topics for each retry count and one for DLQ. Kafka partitioning order complicates this. I imagine the DB could also be used, or other options could be explored.

Note that as soon as a consumer needs to make requests to another service, and that service may sometimes be flaky, this may be an issue, because replaying events requires manual intervention by a developer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by tracing the current Kafka consumer and event-bus flow, then compare retry and dead-letter-queue designs, including partition ordering and possible Redis Streams or database approaches; done requires an agreed design and implementation plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
kafka, python, redis
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.