You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhangshenghang (via GitHub)" <gi...@apache.org> on 2026/09/18 00:46:00 UTC

[I] [Bug][Connector-V2][RocketMQ] Broker-side consumer offset never becomes visible after commitSync, breaking RocketMqIT across all container legs [seatunnel]

zhangshenghang opened a new issue, #12383:
URL: https://github.com/apache/seatunnel/issues/12383

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/seatunnel/issues) and found nothing similar.
   
   ### What happened
   
   `RocketMqIT` failed 43 invocations (14 failures + 29 errors) in a single CI run — every container leg of `testSinkRocketMq` (and siblings) errored at the same place: after the test consumer successfully polled messages and called `commitSync()`, the broker-side consumer offset for `MessageQueue [topic=test_topic, brokerName=broker-a, queueId=0]` was **never visible** — not just lagging, but absent from `RocketMqAdminUtil.currentOffsets` — for the full 60s window.
   
   ### Evidence (fork CI run on branch `fix-12353-cancel-state-priority`, 2026-09-17, jobs `rocketmq-connector-it (8/11, ubuntu-latest)`)
   
   ```
   ConditionTimeoutException: Consume offset should be visible for MessageQueue
   [topic=test_topic, brokerName=broker-a, queueId=0] ==> expected: not <null> within 1 minutes.
       at RocketMqIT.waitConsumedOffsetsSynced(RocketMqIT.java:577)
       at RocketMqIT.getRocketMqConsumerData(RocketMqIT.java:558)
   ```
   
   - Message consumption itself worked (test logs show `Consumer test_topic data total 10..70`).
   - `updateConsumeOffsetToBroker` + `commitSync()` were called (the while loop completed — `data total` is logged after it).
   - The admin-side offset query then never returned an entry for broker-a queue 0 within 60s.
   
   Note this window was already widened from 30s → 60s for a previous occurrence, so "slow broker" alone does not explain an offset that never appears at all.
   
   ### Expected behavior
   
   After `commitSync()` returns, `queryConsumerOffset`/admin offset lookups for the consumed queues should observe the committed offset (within the retry window).
   
   ### Suspect areas
   
   - Offset commit vs. consumer group rebalance: the test consumer shuts down right after `commitSync()`; if a rebalance/instance deregistration races the commit, the broker may drop or never persist the offset for that queue.
   - `RocketMqAdminUtil.currentOffsets` silently omitting queues whose `queryConsumerOffset` returns `OFFSET_NOT_FOUND` or throws, which turns a broker-side miss into a permanent map miss instead of a retryable lag.
   - Topic route propagation timing for queues on `broker-a` when multiple queues/brokers exist.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes, I am willing to investigate and submit a PR, but would first like maintainer input on the suspect areas above.


-- 
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: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Connector-V2][RocketMQ] Broker-side consumer offset never becomes visible after commitSync, breaking RocketMqIT across all container legs [seatunnel]

Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on issue #12383:
URL: https://github.com/apache/seatunnel/issues/12383#issuecomment-5724754506

   Thanks for the detailed report. Could you attach the full `RocketMqIT` test log and the broker container log for one failing leg (ideally the fork CI run link)? Broker-side lines around the offset commit and any exception logged or swallowed inside `RocketMqAdminUtil.currentOffsets` would help tell a never-persisted commit apart from a failed or silently-empty admin query.
   
   On your suspect areas: the rebalance race looks plausible, since the test consumer is shut down right after `commitSync()`. Two things worth trying: (1) after the commit, poll `queryConsumerOffset` from the same consumer until it returns the offset before shutting the consumer down, and (2) make sure the commit actually reaches the broker synchronously rather than only being enqueued client-side.
   
   Since the window was already widened from 30s to 60s without effect, a longer timeout is not the fix. Please also check whether `RocketMqAdminUtil.currentOffsets` returns an empty map or omits queues on any exception (e.g. the consumer group not yet registered on `broker-a`, or an admin query to the wrong broker); if so, logging or rethrowing that error would make the IT fail with the real cause instead of a generic `ConditionTimeoutException`.
   
   <!-- streview-comment:1146 -->


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org