RockteMQ-AI commented on issue #279:
URL: 
https://github.com/apache/rocketmq-streams/issues/279#issuecomment-5215664169

   **Issue Evaluation**
   
   Category: `question`
   
   In RocketMQ Streams, when multiple consumer instances consume the same topic:
   
   1. **Join operations**: Each instance processes its assigned queues 
independently. Join operations (e.g., `join()`) require data from both sides to 
be co-located on the same instance. If the two topics being joined have 
different queue assignments, the join may not produce correct results unless 
you use a **keyBy** to ensure data affinity.
   
   2. **Window operations**: Window computations are per-instance based on 
queue assignment. Each instance maintains its own window state for its assigned 
queues. Windows will work correctly as long as each instance processes its own 
partition's data within the window timeframe.
   
   3. **Scaling**: Adding more instances triggers a rebalance — queues are 
redistributed. During rebalance, some windows may be incomplete. Use 
`WindowStream.fireBeforeClose()` or similar mechanisms to handle late data.
   
   For multi-instance deployments, ensure:
   - Use `keyBy()` for operations that require data co-location
   - Configure appropriate watermark strategies for window correctness
   - Monitor rebalance frequency to minimize window disruption
   
   For more details, refer to the project documentation and source code in the 
`stream` module.
   
   ---
   *Automated evaluation by RocketMQ AI Assistant*


-- 
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