drpmma opened a new issue, #7296: URL: https://github.com/apache/rocketmq/issues/7296
### Before Creating the Enhancement Request - [X] I have confirmed that this should be classified as an enhancement rather than a bug/feature. ### Summary Add `go-away` mechanism for `rocketmq-client` for graceful shutdown when connected to Proxy. ### Motivation Currently, the network layer of the Remoting client is designed based on the Client-Broker pattern. Client will maintains a Channel for each Broker and keeps a long-lasting connection through heartbeats. In the event of channel going online or offline, a switch between primary and backup occurs to change the long connection. Therefore, a set of primary and backup Brokers as an abstract whole possesses multiple connections. However, with the introduction of the Proxy module in RocketMQ 5.0, the route differ from the previous Broker approach. In production, the addresses of route often correspond to a load balancer, which is supported by multiple servers behind it. If one of the servers undergoes a restart, the connection associated with it becomes unavailable until the next RPC failure triggers a closeChannel event. Only then will a new connection be established. During this process, any ongoing requests will fail and appear as timeouts on the client side, even though there are still available servers behind the load balancer. In simple terms, the current client is not well-adapted to effectively accommodate the Proxy mode introduced in version 5.0. ### Describe the Solution You'd Like The issue consists of three parts. 1. Refector NettyRemotingAbstract with unify future implementation. 2. Add goaway and reconnection mechanism. 3. Add ChannelEventListener for MQClientAPIImpl. ### Describe Alternatives You've Considered No ### Additional Context  -- 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-unsubscr...@rocketmq.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org