mxsm commented on code in PR #4644:
URL: https://github.com/apache/eventmesh/pull/4644#discussion_r1426067796


##########
eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/consumer/SubStreamHandler.java:
##########
@@ -99,8 +99,7 @@ public void onNext(final CloudEvent message) {
 
             @Override
             public void onError(final Throwable t) {
-                LogUtils.error(log, "Received Server side error", t);
-                close();
+                log.error("Received Server side error", t);

Review Comment:
   > You removed the close() method, will it affect the acceptance of messages 
when the completed method cannot be called in the end under abnormal 
circumstances?
   > 
   > 您移除了close()方法,那异常情况下最终调用不到completed方法,会不会影响消息的接受?
   
   My understanding here is that it is not necessary to close it in the case of 
a stream. Once closed, it will directly disconnect from the server. The SDK 
will directly exit.
   Here is the gRPC description of StreamObserver#onCompleted.
   
![image](https://github.com/apache/eventmesh/assets/15797831/84189570-3ddf-46e5-bd98-d2d239598543)
   This is also the reason why retries are not possible.
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to