← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

Message Broker

Messaging Intermediate
debt(d9/e7/b7/t5)
d9 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'silent in production until users hit it' (d9). detection_hints.automated is explicitly 'no', meaning no tooling catches misuse. Common mistakes like missing acknowledgements or ignoring TTL only manifest as unbounded queue growth or duplicate delivery under load — silent until real traffic exposes them.

e7 Effort Remediation debt — work required to fix once spotted

Closest to 'cross-cutting refactor across the codebase' (e7). The quick_fix advises choosing the right broker (Kafka vs RabbitMQ vs Redis Streams vs SQS) — a wrong choice or missing acknowledgement patterns typically requires reworking producer and consumer code across multiple services, changing infrastructure configuration, and potentially migrating accumulated messages. This is inherently cross-cutting in a microservices context.

b7 Burden Structural debt — long-term weight of choosing wrong

Closest to 'strong gravitational pull' (b7). The term applies_to web, cli, and queue-worker contexts, and tags include microservices. A chosen message broker becomes load-bearing infrastructure: every service that produces or consumes messages is shaped by its topology, acknowledgement model, retention policies, and operational characteristics. Every future service integration must account for the broker's constraints.

t5 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'notable trap' (t5). The canonical misconception is that message brokers and job queues are the same thing. This is a well-documented gotcha — developers reaching for a full broker (RabbitMQ, Kafka) when a simpler application-level job queue suffices, or vice versa, is a common and consequential error. It contradicts intuition but is widely documented once learned, placing it at t5.

About DEBT scoring →

TL;DR

A message broker is middleware that receives, routes, and delivers messages between producers and consumers — decoupling services and enabling async communication at scale.

Explanation

Message brokers: Kafka (high-throughput log, replay), RabbitMQ (feature-rich routing, AMQP), Redis Streams (lightweight, Kafka-like), SQS/SNS (AWS managed). Core concepts: producer sends to broker, consumer reads from queue/topic, broker persists until acknowledged. Benefits: decoupling (producers don't know consumers), durability (messages persist), load levelling, retries, dead letter queues. Patterns: point-to-point queue (one consumer gets each message), pub/sub topic (all subscribers get each message). PHP: php-amqplib (RabbitMQ), rdkafka, aws-sdk (SQS), Redis Streams via Predis/PhpRedis.

Common Misconception

Message brokers and job queues are the same — job queues (Laravel Queue, Symfony Messenger) are application-level abstractions that can use message brokers as a transport.

Why It Matters

Message brokers are the backbone of microservice communication — they enable services to scale independently and survive each other's failures.

Common Mistakes

  • Not acknowledging messages — broker redelivers indefinitely.
  • Ignoring message TTL — queue grows unboundedly on consumer failure.
  • Using message broker where a job queue suffices — adds operational complexity.

Code Examples

✗ Vulnerable
// Synchronous service calls — tight coupling:
$orderService->process($order);
$inventoryService->decrement($items); // Fails? Order partially processed
✓ Fixed
// Async via message broker:
$bus->dispatch(new OrderPlaced($order->id));
// OrderPlacedHandler runs asynchronously, retried on failure
// InventoryHandler subscribes separately, independently retried

Added 23 Mar 2026
Views 68
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 0 pings S 1 ping M 1 ping T 0 pings W 0 pings T 4 pings F 0 pings S 5 pings S 7 pings M 1 ping T 0 pings W 0 pings T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 3 pings S 2 pings M 0 pings T 0 pings W
No pings yet today
No pings yesterday
Scrapy 12 Perplexity 7 Amazonbot 6 Google 6 ChatGPT 5 SEMrush 5 Unknown AI 3 PetalBot 3 Claude 2 Bing 2 Ahrefs 2 Meta AI 1 Majestic 1
crawler 48 crawler_json 6 pre-tracking 1
DEV INTEL Tools & Severity
🔵 Info ⚙ Fix effort: High
⚡ Quick Fix
Choose broker based on needs: Kafka for high-throughput replay, RabbitMQ for flexible routing, Redis Streams for lightweight, SQS for managed. Always acknowledge messages.
📦 Applies To
web cli queue-worker Symfony Messenger Laravel Queue
🔗 Prerequisites
🔍 Detection Hints
Auto-detectable: ✗ No
🤖 AI Agent
Confidence: Low False Positives: High ✗ Manual fix Fix: High Context: File


✓ schema.org compliant