Skip to content

ADR-0239: Discovery caches destination names and dead-letter destinations ​

  • Status: accepted
  • Date: 2026-12-02
  • Deciders: Mahdi Amirabdollahi
  • Change: openspec/changes/39-estate-dashboard

Context ​

Two reads made a request wait on a broker:

  • The dead-letter view read the broker's address settings on every request.
  • Finding a destination by name could only use subscription snapshots, so a topic no group reads, or an address with no queue, could not be found without asking each broker.

The estate overview and find must never call a broker (ADR-0238).

Decision ​

On each discovery tick (1 min), the scrape records two things for each cluster in platform.scrape:

  • the dead-letter and expiry destinations from the system's dead-letter extension, in dead_letter_destination;
  • every destination's name and kind label, through the system's batched destination listing, in destination_name.

How the cache behaves:

  • Names that are gone are removed.
  • A failed read keeps the last rows and records the failure.
  • The reads go through the per-node rate limiter.

Who reads it:

  • The dead-letter view, the estate overview and find read these tables.
  • The dead-letter view no longer reads settings live.
  • When the settings have never been read, it still says the configuration is unavailable, rather than guessing from names.

Consequences ​

  • Opening the dead-letter view and the Dashboard costs no broker read.
  • Find covers every destination.
  • A new dead-letter address or destination appears within a minute rather than at once.
  • Each cluster gets one more batched list read per minute.
  • Both tables are disposable caches, like subscription_snapshot.

Alternatives considered ​

  • Matching dead-letter destinations by name. It misreports a custom dead-letter address, which the dead-letter spec forbids.
  • Finding only subscriptions. "Where is topic X?" would come back empty for a real topic.
  • Reading live with a short in-memory cache. The first viewer would still wait on a slow broker.

Apache-2.0. Apache Kafka, Apache ActiveMQ and Apache ActiveMQ Artemis are trademarks of the Apache Software Foundation. RabbitMQ is a trademark of its owner. Rahdar is an independent project, not produced by, endorsed by, or affiliated with the ASF or the owner of RabbitMQ.