RockteMQ-AI commented on issue #1316:
URL: 
https://github.com/apache/rocketmq-clients/issues/1316#issuecomment-5142195687

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase on the 
`master` branch (commit 9fe1449).
   
   **Root Cause:** In `defaultClient.startUp()` (`golang/client.go:605`), the 
blocking loop `for !cli.inited.Load()` waits indefinitely for `cli.inited` to 
become `true`. However, `inited` is only set to `true` inside 
`onSettingsCommand()` (`golang/client.go:738`), which is invoked from the 
telemetry stream handler. The telemetry stream is established by `telemeter()`, 
which is only called:
   1. During the `initTopics` loop (lines 554-558) — skipped when no topics are 
pre-registered
   2. Inside the periodic `ticker.Tick` callback that iterates over 
`cli.router` — but the router is empty when no topics exist
   
   This creates a circular dependency: telemetry requires topics → topics 
require telemetry → `Producer.Start()` deadlocks.
   
   **Impact:** Any Go application creating a `Producer` without pre-registering 
topics via `WithTopics(...)` will hang indefinitely on `Start()`. This is a 
regression introduced in v5.1.4 by the `startUp()` blocking wait change.
   
   **Severity:** High — completely blocks Producer usage without topic 
pre-registration, which is the default usage pattern.
   
   **Suggested Fix:** Either (a) decouple the `inited` wait from telemetry by 
establishing the telemetry stream independently of topic routes, or (b) skip 
the `inited` wait when `initTopics` is empty, or (c) add a timeout to the 
blocking wait loop.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*


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