RabbitMQ + DNS SRV records: Unresolved behavior in hostname resolution caching
26.5K reputation · 14 May 2025, 18:05 UTC
Goal
Determine how RabbitMQ handles hostname lookups when clients use DNS SRV records for cluster discovery and whether it refreshes those lookups after a connection is established.
Constraints
RabbitMQ resolves hostnames via the operating system resolver; it does not natively support SRV records. Once a client connects, the broker does not re‑resolve the hostname, potentially relying on cached DNS entries. The current releases expose no configuration to adjust the DNS cache TTL, and no mechanism exists to force a lookup without restarting the broker.
Unresolved Decision
It remains unclear whether future RabbitMQ releases will add native SRV record support or expose a setting for DNS cache duration, and how that would affect dynamic cluster topologies.
Specific Questions
- Does RabbitMQ cache DNS lookups for a fixed period, and if so, what is that period?
- Can a client or broker trigger a DNS re‑resolution without restarting the node?
- Will upcoming releases provide a configurable DNS cache TTL or native SRV record handling?