Message Dispatch Extension

Message Dispatch Extension

Extension Description

Channel information dispatcher, used to specify thread pool model.

Extension Interface

org.apache.dubbo.remoting.Dispatcher

Extension Configuration

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

Known Extensions

  • org.apache.dubbo.remoting.transport.dispatcher.all.AllDispatcher
  • org.apache.dubbo.remoting.transport.dispatcher.direct.DirectDispatcher
  • org.apache.dubbo.remoting.transport.dispatcher.message.MessageOnlyDispatcher
  • org.apache.dubbo.remoting.transport.dispatcher.execution.ExecutionDispatcher
  • org.apache.dubbo.remoting.transport.dispatcher.connection.ConnectionOrderedDispatcher

Extension Example

Maven project structure:

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

XxxDispatcher.java:

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

META-INF/dubbo/org.apache.dubbo.remoting.Dispatcher:

  1. xxx=com.xxx.XxxDispatcher

Feedback

Was this page helpful?

Yes No

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