How RocketMQ 4.8.0 Supercharges DLedger with Massive Performance and Stability Gains

Apache RocketMQ 4.8.0 introduces extensive DLedger enhancements, including asynchronous pipeline processing, batch log replication, extensive chaos‑testing validation, preferred‑leader selection, and batch‑message support, delivering several‑fold throughput improvements, faster recovery from failures, and new functional capabilities for production‑grade messaging.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
How RocketMQ 4.8.0 Supercharges DLedger with Massive Performance and Stability Gains

Apache RocketMQ 4.8.0 has been released, bringing a large set of optimizations and bug fixes to the DLedger mode, which is the Raft‑based commit‑log implementation introduced in version 4.5.0 to provide automatic failover for broker groups.

Performance upgrades

Asynchronous pipeline mode – The previous synchronous processing required the SendMessageProcessor thread to wait for majority replication before responding. The new version uses CompletableFuture to decouple acknowledgment from the processing thread, allowing the next request to be handled immediately while a separate thread finalizes the ack, dramatically increasing throughput.

DLedger pipeline processing diagram
DLedger pipeline processing diagram

Batch log replication – Setting isEnableBatchPush=true aggregates multiple entries into a single packet, reducing system‑call overhead and context switches. This improves throughput under high load without adding latency to individual messages.

Batch replication diagram
Batch replication diagram

Additional lock and cache optimizations further multiply DLedger performance.

Stability upgrades

To validate DLedger reliability, the community applied the OpenMessaging‑Chaos framework, which injects faults such as random network partitions, packet loss, process kills, and slow nodes. The tests run a 5‑node DLedger cluster with four concurrent clients, alternating 100 s of normal operation and 100 s of fault injection for a total of 2400 s.

random‑partition – simulates symmetric network partitions.

random‑loss – drops a configurable proportion of packets.

random‑kill (minor/major/fixed) – simulates process crashes.

random‑suspend (minor/major/fixed) – simulates slow nodes (e.g., GC pauses, OOM).

bridge and partition‑majorities‑ring – simulate asymmetric partitions.

Chaos testing workflow
Chaos testing workflow

The latency chart shows brief periods of unavailability during fault injection, but the cluster recovers within 30 s, typically around 22 s on average. No message loss was observed among the 110,000 messages sent, confirming the At‑Least‑Once delivery guarantee.

Latency during chaos test
Latency during chaos test
Test result statistics
Test result statistics

These tests uncovered several hidden issues, which have been fixed, further improving DLedger's tolerance to process crashes, slow nodes, symmetric/asymmetric partitions, and packet loss.

Feature upgrades

Preferred Leader – The new preferredLeaderId configuration allows explicit leader selection, enabling better data‑center alignment and mixed‑deployment strategies.

Preferred leader configuration
Preferred leader configuration

Batch message support – Starting with 4.8.0, DLedger can send batch messages, making its capabilities fully comparable to the traditional Master‑Slave deployment.

The release also includes 25 improvements, 11 bug fixes, and 16 documentation/code‑format enhancements contributed by nearly 40 community members.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

performanceMessage QueuestabilityApache RocketMQchaos testingDLedger
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.