Skip to main content
Version: v2.0.0

Lite Topic (RocketMQ 5.x)

Audience: RocketMQ 5.x users who need lightweight, hierarchical messaging — many logical sub-topics inside one physical parent topic, with server-managed offsets and no per-lite-queue consumer plumbing.


What it is

Lite Topic is RocketMQ 5.5+'s hierarchical message container (RIP-83). A Lite Topic lives inside a normal parent topic declared as LITE type; individual lite queues inside it share the parent's storage, so creating thousands of logical topics costs almost nothing.

EventMesh exposes Lite Topic over the same HTTP surface as regular topics:

OperationEndpointNotes
Create (idempotent)POST /events/lite/createParent must be LITE type
PublishPOST /events/lite/publish / publish-bytesTo a lite queue inside the parent
PollGET /events/lite/poll / poll-bytesBatch poll like regular long-poll

The -bytes variants carry raw binary payloads without JSON encoding.

Semantics — and how they differ from regular topics

Lite Topic trades the runtime's full reliability machinery for RocketMQ-native simplicity:

PropertyRegular topicsLite Topic
Offset ownershipEventMesh runtime (ACK-driven)Storage plugin (managed inside the plugin)
ACK / DLQExplicit ACK, retries, DLQNone — consumption is poll-and-forget
OrderingPer partition (LOAD_BALANCE_STICKY per key)Per lite queue
BackendKafka / RocketMQ 4.x / 5.xRocketMQ 5.x only (LiteTopicCapable)

Use Lite Topic for high-fanout, low-ceremony channels (presence, metrics, chat rooms); use regular topics where unacked-redelivery and dead-lettering matter.

Checkpointing and crash replay

The storage plugin periodically persists each lite queue's pull offset to disk (default every 5 s):

eventmesh.rocketmq5.lite.checkpoint.interval.ms=5000
  • A JVM crash replays at most one interval's worth of messages.
  • Shutdown always persists regardless of the interval.
  • <= 0 disables periodic checkpointing (persist on shutdown only).

SDK

client.createLiteTopic("chat", "room-42");           // idempotent
client.publishLite("chat", "room-42", event);
client.subscribeLite("chat", "room-42", event -> { ... }); // background poll loop
client.unsubscribeLite("chat", "room-42");

subscribeLite runs a background poll loop with plugin-managed offsets — no ACK calls, no DLQ.

Where the code lives

PieceLocation
SPI capability markereventmesh-storage-plugin/eventmesh-storage-api/.../storage/LiteTopicCapable.java
RocketMQ 5.x implementationeventmesh-storage-plugin/eventmesh-storage-rocketmq5/
HTTP endpointseventmesh-runtime/.../http/UniHttpServer.java (liteCreate, litePublish, litePoll)
SDKeventmesh-sdks/.../cloudevents/CloudEventsClient.java (*Lite methods)
TestsRocketMQ5LiteHttpIntegrationTest, MeshStoragePluginTCK (LiteTopic contract)