scenes to be used
Sticky connections are used for stateful services, so that the client always initiates calls to the same provider as much as possible, unless the provider hangs up and connects to another one.
Sticky connection will automatically enable Delayed Connection to reduce the number of long connections.
How to use
<dubbo:reference id="xxxService" interface="com.xxx.XxxService" sticky="true" />
Dubbo supports method-level sticky connections, if you want more fine-grained control, you can also configure it like this.
<dubbo:reference id="xxxService" interface="com.xxx.XxxService"> <dubbo:method name="sayHello" sticky="true" /> </dubbo:reference>
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.