Apache RocketMQ recovery

RocketMQ recovery should treat CommitLog as message evidence and rebuild derived queues only from a protected copy.

Apache RocketMQ appends message bodies and metadata to CommitLog files. ConsumeQueue and IndexFile structures are derived dispatch indexes that let consumers find messages efficiently, while broker metadata and offsets track delivery state.

Understand the symptom

ConsumeQueue can often be rebuilt; missing CommitLog message ranges generally cannot be recreated from that index.

WHY

What is happening

At startup the broker checks CommitLog records and dispatches them into ConsumeQueue and index structures. Abnormal shutdown recovery can truncate invalid tails, which is appropriate only after the last valid physical offset is established on protected copies. In replicated deployments, broker copies may differ because of acknowledgment mode and replication lag.

What you may see

Symptoms that change the recovery path.

01

Broker fails during store recovery

CommitLog parsing or checkpoint consistency cannot be established.

02

Consumers miss an offset range

ConsumeQueue entries may be absent or point outside valid CommitLog data.

03

Message lookup fails but consumption works

IndexFile damage may affect key-based search while queue data remains.

04

Master and replica offsets differ

The surviving broker copies contain different message tails.

Protect the source

Actions that can make the situation worse.

01

Deleting CommitLog loses payloads

Derived queues do not contain full message bodies.

02

Tail truncation can discard valid messages

The last safe physical offset must be proven first.

03

Promoting a lagging replica loses recent writes

Acknowledged data may exist only on another disk generation.

Do this now

Safe steps before evaluation.

01

Stop brokers and producers

Prevent new writes, cleanup, role changes, and automatic recovery mutations.

02

Image complete store trees

Copy all broker stores, checkpoints, markers, configs, and disk layout.

03

Compare physical offsets

Record min, max, confirm, dispatch, and replica offsets with timestamps.

04

Preserve delivery state

Export consumer groups, offsets, retries, delay queues, and transactional message evidence.

NEPFOSYS process

How a data-first evaluation proceeds.

01

CommitLog boundary analysis

NEPFOSYS parses records and compares valid physical ranges across broker copies.

02

Derived-index reconstruction

ConsumeQueue and index data are rebuilt from a protected authoritative log.

03

Delivery validation

Topics, keys, timestamps, offsets, retries, and transaction states are checked on an isolated broker.

A clear next step

Preserve the original device before another repair or recovery attempt.

Start a case with the exact symptoms, incident timeline, prior attempts, encryption details, and the files that matter most. NEPFOSYS will route the case to the appropriate DFW intake or nationwide mail-in path.

Start with a case review

Questions, answered

What customers ask before starting.

Can I delete ConsumeQueue and rebuild it?

It may be rebuildable from a complete CommitLog, but preserve every store first.

Can ConsumeQueue restore missing message bodies?

No. It points to CommitLog positions and does not contain the complete payload.

Which replica should become authoritative?

The one with the most complete consistent CommitLog history, not simply the node currently online.

DFW local · Nationwide mail-in

Protect the device. Start with the facts.

Start my recovery case