ЛР 5 — БВТ2301 — Курлова — на 5

RabbitMQ + transactional outbox, отдельный worker (thumbnail/crop/WebP), lease и heartbeat, retry с backoff+jitter, DLQ и replay, admission control; тесты отказов, трек 1 и отчёт.
This commit is contained in:
alenchha
2026-11-06 12:10:16 +03:00
parent 276dbdad8a
commit 633fb96920
57 changed files with 5194 additions and 22 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
# Credentials come from a Docker secret; RabbitMQ's config cannot read files, so render a conf.d fragment at start.
set -eu
PASS="$(cat /run/secrets/rabbitmq_password)"
mkdir -p /etc/rabbitmq/conf.d
cat > /etc/rabbitmq/conf.d/20-credentials.conf <<CONF
default_user = messenger
default_pass = ${PASS}
default_vhost = messenger
default_permissions.configure = .*
default_permissions.read = .*
default_permissions.write = .*
CONF
exec docker-entrypoint.sh rabbitmq-server
+10
View File
@@ -0,0 +1,10 @@
# Durable broker for the attachment pipeline (see REPORT.md).
loopback_users.guest = true
listeners.tcp.default = 5672
# A delivery not acked for 10 min is returned to the queue (worker hang guard on the broker side;
# the application lease in PostgreSQL detects a hung job much earlier).
consumer_timeout = 600000
# Refuse publishes before the disk fills up (publisher sees the block and the outbox keeps the jobs).
disk_free_limit.absolute = 200MB
vm_memory_high_watermark.relative = 0.6
log.console.level = warning