bobbyz007 commented on issue #13666:
URL: https://github.com/apache/dubbo/issues/13666#issuecomment-1895707173
3.3.0 beta-1 版本也不行
server:
```
AsyncContext asyncContext = RpcContext.startAsync();
return CompletableFuture.supplyAsync(() -> {
asyncContext.signalContextSwitch();
RpcContextAttachment serverContext =
RpcContext.getServerContext();
// 往调用端传递参数
serverContext.setAttachment("server-key1", "server-");
```
client:
```
CompletableFuture<String> f = greetingService.helloFuture();
f.whenComplete((v, t) -> {
logger.info(RpcContext.getServerContext().getAttachment("server-key1"));
```
--
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]