chennaji9 opened a new pull request, #11335:
URL: https://github.com/apache/rocketmq/pull/11335

   <!-- Please make sure the target branch is right. In most case, the target 
branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   Fixes #11327
   
   ### Brief Description
   
   The operations-demo producer parsed the required `-c` message count inside 
the send-loop condition, after `producer.start()`. A non-numeric value then 
threw `NumberFormatException` after the client was started (skipping 
`producer.shutdown()`), and a negative value silently sent nothing while 
appearing to succeed.
   
   The count is now parsed and validated once before any producer resource is 
created: invalid or negative values print a clear message and return without 
starting the producer, and the loop uses the parsed value.
   
   ### How Did You Test This Change?
   
   `mvn -pl example -am -DskipTests compile` (JDK 11, PR base commit) → BUILD 
SUCCESS with the change. Code-path review: the new early-return branch sits 
before `new DefaultMQProducer(...)`, so no client resource is created on 
invalid input; the example module has no test harness, so verification is 
compile + reasoning (no new unit test added).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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