Networking Extension

Networking Extension

Extension Description

Peer network node networker.

Extension Interface

org.apache.dubbo.remoting.p2p.Networker

Extension Configuration

  1. <dubbo:protocol networker="xxx" />
  2. <!-- Default setting. When <dubbo:protocol> does not configure the networker attribute, use this configuration -->
  3. <dubbo:provider networker="xxx" />

Known Extensions

  • org.apache.dubbo.remoting.p2p.support.MulticastNetworker
  • org.apache.dubbo.remoting.p2p.support.FileNetworker

Extension Example

Maven project structure:

  1. src
  2. |-main
  3. |-java
  4. |-com
  5. |-xxx
  6. |-XxxNetworker.java (implements Networker interface)
  7. |-resources
  8. |-META-INF
  9. |-dubbo
  10. |-org.apache.dubbo.remoting.p2p.Networker (plain text file, content: xxx=com.xxx.XxxNetworker)

XxxNetworker.java:

  1. package com.xxx;
  2. import org.apache.dubbo.remoting.p2p.Networker;
  3. public class XxxNetworker implements Networker {
  4. public Group lookup(URL url) {
  5. // ...
  6. }
  7. }

META-INF/dubbo/org.apache.dubbo.remoting.p2p.Networker:

  1. xxx=com.xxx.XxxNetworker

Feedback

Was this page helpful?

Yes No

Last modified September 30, 2024: Update & Translate Overview Docs (#3040) (d37ebceaea7)