Merger Extension
Summary
Merge strategy for return result aggregation in group.
Extension Interface
org.apache.dubbo.rpc.cluster.Merger
Extension Configuration
<dubbo:method merger="xxx" />
Existing Extension
org.apache.dubbo.rpc.cluster.merger.ArrayMerger
org.apache.dubbo.rpc.cluster.merger.ListMerger
org.apache.dubbo.rpc.cluster.merger.SetMerger
org.apache.dubbo.rpc.cluster.merger.MapMerger
Extension Guide
Directory layout:
src
|-main
|-java
|-com
|-xxx
|-XxxMerger.java (Merger implementation)
|-resources
|-META-INF
|-dubbo
|-org.apache.dubbo.rpc.cluster.Merger (plain text file with the content: xxx=com.xxx.XxxMerger)
XxxMerger.java:
package com.xxx;
import org.apache.dubbo.rpc.cluster.Merger;
public class XxxMerger<T> implements Merger<T> {
public T merge(T... results) {
// ...
}
}
META-INF/dubbo/org.apache.dubbo.rpc.cluster.Merger:
xxx=com.xxx.XxxMerger
Feedback
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.
Last modified January 22, 2021: Merge branch 'master' of https://github.com/apache/dubbo-website (f48eac9)