I'd be interested to know what the 3 lines of python were and also more details about the redis server you deployed to replace RabbitMQ during the outage.
while True:
msg = r.lpop(key)
try:
result = do_something(msg)
except Exception as e:
log.error(f'failure for msg "{msg}" got {e} back to queue {key}')
r.rpush(key, msg)
continue
Pop a member from a list, if failed plop it back to the end. It's simple, explicit and just works™Don't get me wrong, I'm using Redis queues myself and trying to get rid of the last remnants of RabbitMQ in our code, but there are use cases where RabbitMQ means less thinking about stuff, because it just works(tm)...
In practice, you need some dead-lettering with a message timeout. Something RabbitMQ does provide out of the box, for all its complexity.