Sorry for bothering, we just simply missed this method.

For those who are interested, here is what we use to configure a specific type 
of protocol to consume for a consumer:

final ReferenceConfig<T> reference = new ReferenceConfig<>();
reference.setInterface(myinterface);
reference.setProtocol("dubbo");

This will make sure this consumer reference target only provider via dubbo 
protocol (provider urls start with dubbo://)

Best
Dat
On 2020/10/07 16:59:53, Tien Dat PHAN <[email protected]> wrote: 
> Dear experts,
> 
> We just wonder if it is possible to configure a Dubbo consumer to consume 
> only a specific protocol type.
> For instance, we have an interface exported with two type of protocols: 
> dubbo:// and http://
> But for a specific consumer, we want this consumer to consume only the 
> dubbo:// protocol, what is the way to configure it, if it is possible? Could 
> you please enlighten us?
> 
> FYI, we are using Dubbo 2.7.6 with Java 8 and on CentOS 7.5.
> 
> Best regards
> Tien Dat PHAN
> 

Reply via email to