-
Notifications
You must be signed in to change notification settings - Fork 26.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using http http protocol in dubbo, how to add custom attachments to URLs consumer side send? #1397
Comments
Hi, welcome to Dubbo community! Please consider using English, Dubbo is a global community, and all the issues may be viewed and discussed by people all over the world. Meanwhile, you can send email to dev@dubbo.apache.org or subscribe it, which is preferred way for discussing questions like this. |
可以自己另写一个Protocol |
@limingwei 怎么写?有案例吗? |
我写了,正在用 |
Duplicate of #1367 |
Dubbo选用http协议,consume发送的URL,如何添加自定义参数?
查阅官方文档,发现有个“信息交换扩展(exchanger)”貌似可以实现在发送的URL里添加自定义参数。
但,网上没有相关自定义扩展的案例,不知道如何实现?
我期望的是:
consume端,在发送URL时,携带sessionId一起发送,http请求。(求解)
provider端,配有Spring Session的请求拦截器,通过URL获取到sessionId,以达到session共享的目的。(这部分已经扩展,可以从Cookie和URL里拦截请求获取sessionId)
信息交换扩展
扩展说明
基于传输层之上,实现 Request-Response 信息交换语义。
扩展接口
com.alibaba.dubbo.remoting.exchange.Exchanger
com.alibaba.dubbo.remoting.exchange.ExchangeServer
com.alibaba.dubbo.remoting.exchange.ExchangeClient
扩展配置
<dubbo:protocol exchanger="xxx" />
<dubbo:provider exchanger="xxx" />
已知扩展
com.alibaba.dubbo.remoting.exchange.exchanger.HeaderExchanger
The text was updated successfully, but these errors were encountered: