RabbitMQ Queue Federation Fails to Consume Due to Policy Name Case Sensitivity
search cancel

RabbitMQ Queue Federation Fails to Consume Due to Policy Name Case Sensitivity

book

Article ID: 439441

calendar_today

Updated On:

Products

VMware Tanzu RabbitMQ

Issue/Introduction

The Federation Link status appears as "Running" in the management console, but messages are not being retrieved from the upstream cluster. The following symptoms are observed:

  • The upstream queue shows zero consumers.
  • The downstream queue shows no federation policy is applied, even though a policy exists.
  • Messages remain in the upstream queue and are not federated downstream.

Environment

  • Platform: All supported versions of RabbitMQ
  • Feature: Queue-based Federation
  • Queue Type: Quorum Queues, Classic Queues
  • Clusters: Upstream Cluster (Source), Downstream Cluster (Destination)

Cause

RabbitMQ queue names and policy regex patterns are strictly case-sensitive. This issue occurs when a naming mismatch exists between the actual queue name on the cluster and the regex pattern defined in the RabbitMQ Policy.

Because RabbitMQ treats queue names as unique byte arrays, any variation in casing (e.g., lowercase "test" vs. uppercase "Test") prevents the policy from "hooking" into the queue. Without a successfully attached policy, the downstream cluster does not initiate the consumer link on the upstream source.

Resolution

Step 1: Identify the "Effective Policy" Navigate to the Queues tab on the downstream cluster. Review the Policy column for the target queue. If the federation policy name is blank, the policy pattern does not match the queue name.

Step 2: Verify Exact Casing Copy the queue name directly from the Name field in the RabbitMQ Management UI to ensure accuracy.

  • Actual Queue Name Example: Test.Queue

Step 3: Update the Policy Pattern Update the federation policy Pattern field to reflect the exact casing identified in Step 2.

  • Incorrect Pattern (Mismatched Case): ^test.queue$
  • Correct Pattern (Exact Match): ^Test.Queue$

Step 4: Confirm Consumer Attachment

  1. Refresh the downstream queue details page. The federation policy name should now appear in the Policy section.
  2. Check the Upstream Cluster management console. A consumer should now be visible on the source queue, indicating the federation link is active and processing messages.

Additional Information

Best Practice:

To make policies more resilient to naming inconsistencies or human error, use a case-insensitive regex by prefixing the pattern with (?i).

  • Resilient Pattern Example: (?i)^Test.Queue$

References:

  1. Troubleshooting Federation "Stopping Link" Messages in RabbitMQ 
  2. Federated Queues   
  3. Exchange and Queue Federation