compu-TEE/distributed-task-queue ? reverse-engineered prompt

Reverse engineered prompt

Build me a distributed task queue in Go that I can run locally with Docker Compose. I want a broker, a client, and multiple workers that talk over gRPC with protobuf messages, so tasks can be submitted once and then handled by any available worker.

It should keep working if a worker crashes, with heartbeats, timeout based task recovery, retries, and a dead letter queue for jobs that keep failing. I also want the broker to remember pending work so it can restart without losing tasks. Please include simple endpoints to see current metrics and worker status, like how many tasks are pending, running, completed, and how many workers are connected.

Make it easy to start everything with one command, and include a small demo or test setup that shows the queue handling a bunch of tasks across several workers. If you need to look up current Go gRPC or protobuf docs online, feel free to do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab