KitwahSin commented on issue #13305: URL: https://github.com/apache/dubbo/issues/13305#issuecomment-1918661777
> > > > > > please assign to me, ths! > > > > > > > > > > > > > > > @laywin It may be find another way to reslove? (Or My analysis may also be wrong) . If just for the logs, it can use link tracing to solve the problem. > > > > > Netty invoke is in the `dubbo-remoting` module, and the filter chain of `ConsumerContextFilter` is build in the `dubbo-cluster` module, the filter is effort before the netty invoke. > > > > > > > > > > > > When you raise a connection to a server,you don't need to specific the local port and local address.We just need to specific the server address and server port,after the tcp connection is established. The socket object would contains four items - local address,local port,target address,target port. Before you return to filter,you set the local address and local port to the filter chain or other variables. so you can get it. > > > > > > > > > we all agree that, the point of disagreement is whether to obtain the local address before or after the invoker invoke happens. I think the focus of this issue is to obtain the local address after that. > > > > > > where is the invoker in ? Which module, I mean. When the connection established, you can get the local address and local port and set it into RpcContext. You can do this in the `dubbo-rpc` module. > > RpcContext is based on threadLocal. When establishing a connection, there may be multiple clients, which means there are multiple ports. How to set the address into the filter at this time? What I mean is that when DubboInvoker doInvoke, it will determine which client to use, so The port of the client can be determined and set into the RpcContext. When the request is completed, the filter callback will be entered to obtain the address information. aha, may be we have the same idea. What I want to do is that we can set local address in TripleInvoker#doInvke function. After the connectionClient.isConnected is called and it returns true, we can get local address, local port from connectClient and set it into RpcContext. -- 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]
