tencent cloud

TDMQ for RabbitMQ

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Introduction and Selection of the TDMQ Product Series
What Is TDMQ for RabbitMQ
Strengths
Use Cases
Description of Differences Between Managed Edition and Serverless Edition
Open-Source Version Support Description
Comparison with Open-Source RabbitMQ
High Availability
Use Limits
TDMQ for RabbitMQ-Related Concepts
Regions
Related Cloud Services
Billing
Billing Overview
Pricing
Billing Example
Convert to Monthly Subscription from Hourly Postpaid
Renewal
Viewing Consumption Details
Overdue Payments
Refund
Getting Started
Getting Started Guide
Step 1: Preparations
Step 2: Creating a RabbitMQ Cluster
Step 3: Configuring a Vhost
Step 4: Using the SDK to Send and Receive Messages
Step 5: Querying a Message
Step 6: Deleting Resources
User Guide
Usage Process Guide
Configuring the Account Permission
Creating a Cluster
Configuring a Vhost
Connecting to the Cluster
Managing Messages
Configure Advanced Feature
Managing the Cluster
Viewing Monitoring Data and Configuring Alarm Policy
Use Cases
Use Instructions of Use Cases
RabbitMQ Client Use Cases
RabbitMQ Message Reliability Use Cases
Usage Instructions for MQTT Protocol Supported by RabbitMQ
Migrate Cluster
Migrating RabbitMQ to Cloud
Step 1. Purchasing a TDMQ Instance
Step 2: Migrating Metadata to the Cloud
Step 3: Enabling Dual Read-Write
API Reference (Managed Edition)
API Overview
API Reference (Serverless Edition)
History
Introduction
API Category
Making API Requests
Relevant APIs for RabbitMQ Serverless PAAS Capacity
RabbitMQ Serverless Instance Management APIs
Data Types
Error Codes
SDK Documentation
SDK Overview
Spring Boot Starter Integration
Spring Cloud Stream Integration
Java SDK
Go SDK
Python SDK
PHP SDK
Security and Compliance
Permission Management
Network Security
Deletion Protection
Change Records
CloudAudit
FAQs
Service Level Agreement
Contact Us
DokumentasiTDMQ for RabbitMQMigrate ClusterStep 3: Enabling Dual Read-Write

Step 3: Enabling Dual Read-Write

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-01-05 11:09:22

Scenarios

This document introduces the operation steps for migrating services from an existing RabbitMQ cluster to a TDMQ for RabbitMQ cluster using the dual-write and dual-consumption method.

Prerequisites

1. You have purchased a TDMQ for RabbitMQ cluster.
2. You have migrated the metadata from an existing RabbitMQ cluster to the TDMQ for RabbitMQ cluster.

Operation Steps

1. Add new consumers to the new RabbitMQ cluster to prepare for consuming messages from the cluster.
2. Add new producers to the new RabbitMQ cluster, and gradually shift production traffic to it through a grayscale release. Afterward, take the producers of the existing RabbitMQ cluster offline while keeping the existing consumers active to continue consuming messages from that cluster. To avoid message duplication or loss, implement idempotent logic for message consumption in advance.
Tip 1: In the RabbitMQ community management console of the existing cluster, verify that production traffic to the self-built RabbitMQ cluster has stopped.
enter image description here


Tip 2: In the RabbitMQ community management console of the existing cluster, check whether the number of backlogged messages in the self-built RabbitMQ cluster is decreasing.
enter image description here


3. Confirm that no unconsumed messages remain. After ensuring that all messages have been fully processed by the consumers of the existing RabbitMQ cluster, decommission the consumers and the cluster to complete the data flow migration.
Tip: Confirm that messages are produced and consumed on the Tencent Cloud RabbitMQ cluster, and no message backlog occurs.
enter image description here


Note:
If you do not follow the above steps (such as switching producers before consumers), it may lead to message loss.
Before you switch the remaining consumers, ensure that all messages in the original RabbitMQ cluster have been fully consumed; otherwise, it may result in unconsumed messages.

Possible Issues

Order Issues

Due to the cluster switch, the order of messages cannot be guaranteed during the switch process. The switch may cause partial out-of-order.

Message Duplication

Theoretically, duplication should not occur, but it may happen in extreme cases. For example, during the switch, a consumer consumes a message but has not yet sent an acknowledgment to the server (the original RabbitMQ cluster). This causes the message to enter the retry queue, leading to duplicate consumption. Implementing idempotency processing logic for messages can avoid this issue.

Consumption Delay

During the read-write switch process, the reallocation of partitions requires rebalancing between queues and consumer clients, which may cause temporary consumption delays. No additional action is required if this occurs. Normal consumption will resume after the switch is complete.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan