f1amingo opened a new issue, #10:
URL: https://github.com/apache/rocketmq-ai/issues/10

   ### Is Your Feature Request Related to a Problem?
   
   A2A's replicated queue manager ships only 
`ReactiveMessagingReplicationStrategy`, which writes every event to a single 
shared Kafka topic. In a multi-instance deployment, every instance either 
consumes the full topic (broadcast) or the cluster is capped by the partition 
count (shared group) — both modes pay the cost of the shared-topic model.
   
   ### Describe the Solution You'd Like
   
   Add a `rocketmq-a2a-replicated` Java module providing a RocketMQ 
LiteTopic-backed `ReplicationStrategy` (`LiteTopicReplicationStrategy`):
   
   - Maps every task to its own LiteTopic channel `t-<taskId>`, so an instance 
receives only events for tasks whose channels it subscribes — precise delivery 
without broadcast amplification or partition-count caps.
   - Uses per-instance consumer groups with `LITE_SELECTIVE` message model; 
Lite broker dispatch delivers once per group, so each replicated event reaches 
every subscribing instance while channels keep delivery scoped to relevant 
tasks.
   - Subscribes without an offset option so the broker replays channel history, 
giving late subscribers events produced before their subscription.
   - Uses `QueueClosedEvent` as poison pill to unsubscribe the channel; channel 
TTL reclaims storage.
   - Integrates through the same CDI seams as the official strategy: a 
`TaskStreamLifecycleHook` implementation (`LiteTopicTaskStreamLifecycleHook`) 
subscribes channels on stream open, and inbound replicated events fire as CDI 
`ReplicatedEventQueueItem` events observed by the SDK's 
`ReplicatedQueueManager`.
   
   The module ships with unit tests and a two-replica demo.
   
   ### Describe Alternatives You've Considered
   
   - Keep the Kafka-based `ReactiveMessagingReplicationStrategy`: shared topic 
forces broadcast or partition-cap trade-offs, and requires a Kafka cluster 
alongside RocketMQ.
   - In-memory replication: does not survive multi-instance deployment, which 
is the problem being solved.
   
   ### Additional Context
   
   Requires a RocketMQ deployment with LiteTopic support (RIP-83, released in 
RocketMQ 5.5.0) and `rocketmq-client-java` 5.2.2+.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to