qingli9374 opened a new pull request, #14:
URL: https://github.com/apache/rocketmq-ai/pull/14

   ## Motivation
   
   Fixes #13.
   
   `RocketMQTransport.sendMessageStreaming` registered the SSE listener after
   `RocketMQUtil.sendRocketMQRequest` returned. Because the request is already 
visible to the
   remote agent at that point, an immediate first response could arrive before 
the listener
   entry existed and be dropped. A failure after registration could also leave 
a stale listener.
   
   ## Modifications
   
   - Added a `sendRocketMQRequest` callback overload that exposes the generated 
request ID before
     `Producer.send`.
   - Registered the streaming listener inside that callback, closing the 
send/register race.
   - Removed the listener if the request send fails.
   - Added a focused regression test using a producer stub to assert 
registration happens before
     `send`.
   
   ## Verification
   
   - `mvn -f rocketmq-a2a/pom.xml -Dcheckstyle.skip=true 
-Dtest=RocketMQUtilStreamRegistrationTest test`
   - `mvn -f rocketmq-a2a/pom.xml -DskipTests validate`
   
   Results: focused test `1/1` passed; Checkstyle reported `0` violations.
   


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