Skip to content

Conversation

@MoritzArena
Copy link
Contributor

@MoritzArena MoritzArena commented Jul 11, 2025

What is the purpose of the change?

Ref: #15528 15528

As of Dubbo 3.3, Reactor remains the primary Reactive Streams implementation officially supported. This integration is highly convenient for applications built with Spring WebFlux or any other frameworks based on Reactor, as it can be used out of the box.

However, beyond Reactor, the Mutiny reactive framework has been steadily gaining traction. From our perspective, we see strong potential for Mutiny as an emerging direction in reactive programming. Similarly, as more modern enterprise applications adopt Quarkus for web development, the demand for Mutiny-compatible support in Dubbo is likely to grow.

In response to this, our team has already integrated Mutiny support into Dubbo based on version 3.3. We are currently in the process of completing full business-level testing and protoc compilation validation, which we expect to finalize within the coming week. We would like to contribute this feature to the Dubbo community and sincerely hope it can be officially considered for inclusion in an upcoming release.

Missions

The work on Dubbo's support for Mutiny Reactive has been completed, and the code has been created on the 3.3 branch. It is located in the dubbo-plugin/dubbo-mutiny module. This module requires at least JDK 17, as starting from Mutiny 3, it switched to the JDK 9 Flow reactive specification, and the module uses Mutiny 3.

Regarding the proto compiler plugin, we have completed the build of version 3.4.0.beta1 and introduced it into the project. We have also validated the transport of Uni -> Uni, Uni -> Multi, Multi -> Uni, and Multi -> Multi in a wide range of business scenarios on Quarkus platform and Mutiny based web applications. After ensuring that all reactive methods run correctly, I am submitting this PR.

The Multi -> Multi run example:

image

Dubbo samples will be added soon later.

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2025

Codecov Report

❌ Patch coverage is 74.52471% with 67 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.06%. Comparing base (34c3468) to head (82a9865).

Files with missing lines Patch % Lines
...g/apache/dubbo/mutiny/calls/MutinyClientCalls.java 52.63% 18 Missing ⚠️
...he/dubbo/mutiny/AbstractTripleMutinyPublisher.java 73.77% 4 Missing and 12 partials ⚠️
...bo/gen/tri/mutiny/MutinyDubbo3TripleGenerator.java 0.00% 9 Missing ⚠️
...e/dubbo/mutiny/AbstractTripleMutinySubscriber.java 74.19% 1 Missing and 7 partials ⚠️
...che/dubbo/mutiny/ServerTripleMutinySubscriber.java 72.00% 6 Missing and 1 partial ⚠️
...che/dubbo/mutiny/ClientTripleMutinySubscriber.java 20.00% 4 Missing ⚠️
...g/apache/dubbo/mutiny/calls/MutinyServerCalls.java 95.00% 1 Missing and 2 partials ⚠️
...ache/dubbo/mutiny/ClientTripleMutinyPublisher.java 60.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15537      +/-   ##
============================================
+ Coverage     60.05%   61.06%   +1.00%     
- Complexity    10167    11500    +1333     
============================================
  Files          1909     1922      +13     
  Lines         86782    87045     +263     
  Branches      13094    13106      +12     
============================================
+ Hits          52119    53153    +1034     
+ Misses        29200    28456     -744     
+ Partials       5463     5436      -27     
Flag Coverage Δ
integration-tests-java21 32.84% <0.00%> (-0.11%) ⬇️
integration-tests-java8 32.96% <0.00%> (-0.10%) ⬇️
samples-tests-java21 31.51% <0.00%> (?)
samples-tests-java8 29.21% <0.00%> (?)
unit-tests-java11 59.08% <0.00%> (?)
unit-tests-java17 58.83% <74.52%> (+0.03%) ⬆️
unit-tests-java21 58.85% <74.52%> (+0.05%) ⬆️
unit-tests-java8 59.08% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

gnl00

This comment was marked as resolved.

@zrlw
Copy link
Contributor

zrlw commented Jul 16, 2025

  1. if the plugin just works on jdk17+, the module should be added to jdk17+ profile, like dubbo-spring6-security at dubbo-parent pom (Not only this pom needs to be modified):
<profile>
      <id>jdk-version-ge-17</id>
      <activation>
        <jdk>[17,)</jdk>
      </activation>
      <modules>
        ...
        <module>dubbo-plugin/dubbo-spring6-security</module>
        ...
      </modules>
    </profile>
  1. supplement test cases to [dubbo-integration-cases]https://github.com/apache/dubbo-integration-cases / dubbo-samples for the new plugin.

@MoritzArena
Copy link
Contributor Author

MoritzArena commented Jul 16, 2025

  1. if the plugin just works on jdk17+, the module should be added to jdk17+ profile, like dubbo-spring6-security at dubbo-parent pom (Not only this pom needs to be modified):
<profile>
      <id>jdk-version-ge-17</id>
      <activation>
        <jdk>[17,)</jdk>
      </activation>
      <modules>
        ...
        <module>dubbo-plugin/dubbo-spring6-security</module>
        ...
      </modules>
    </profile>
  1. supplement test cases to dubbo-integration-cases / dubbo-samples for the new plugin.

got it!

@zrlw
Copy link
Contributor

zrlw commented Jul 16, 2025

The main function of dubbo-samples is demonstrating usage example, so push the new plugin case with README.md might be more important.

@MoritzArena
Copy link
Contributor Author

What caused these github action errors? Are they related with dubbo-plugin/dubbo-mutiny module?

@zrlw
Copy link
Contributor

zrlw commented Jul 20, 2025

What caused these github action errors? Are they related with dubbo-plugin/dubbo-mutiny module?

download log archive of the failed test job, you'll find the root cause, e.g.

2025-07-19T16:09:01.8175695Z [INFO] --- compiler:3.14.0:compile (default-compile) @ dubbo-mutiny ---
2025-07-19T16:09:01.8248711Z [INFO] Recompiling the module because of changed dependency.
2025-07-19T16:09:01.8254429Z [INFO] Compiling 12 source files with javac [forked debug release 9] to target/classes
2025-07-19T16:09:01.9315266Z [INFO] -------------------------------------------------------------
2025-07-19T16:09:01.9315894Z [ERROR] COMPILATION ERROR : 
2025-07-19T16:09:01.9316406Z [INFO] -------------------------------------------------------------
2025-07-19T16:09:01.9316832Z [ERROR] javac: invalid target release: 9
2025-07-19T16:09:01.9317114Z Usage: javac <options> <source files>
2025-07-19T16:09:01.9317391Z use -help for a list of possible options

@MoritzArena
Copy link
Contributor Author

What caused these github action errors? Are they related with dubbo-plugin/dubbo-mutiny module?

download log archive of the failed test job, you'll find the root cause, e.g.

2025-07-19T16:09:01.8175695Z [INFO] --- compiler:3.14.0:compile (default-compile) @ dubbo-mutiny ---
2025-07-19T16:09:01.8248711Z [INFO] Recompiling the module because of changed dependency.
2025-07-19T16:09:01.8254429Z [INFO] Compiling 12 source files with javac [forked debug release 9] to target/classes
2025-07-19T16:09:01.9315266Z [INFO] -------------------------------------------------------------
2025-07-19T16:09:01.9315894Z [ERROR] COMPILATION ERROR : 
2025-07-19T16:09:01.9316406Z [INFO] -------------------------------------------------------------
2025-07-19T16:09:01.9316832Z [ERROR] javac: invalid target release: 9
2025-07-19T16:09:01.9317114Z Usage: javac <options> <source files>
2025-07-19T16:09:01.9317391Z use -help for a list of possible options

maybe I need some help, I have already update jdk-version-17-ge with dubbo-plugin/dubbo-mutiny in dubbo-parent pom.xml and aligned with the configuration of dubbo-plugin/dubbo-spring6-security, and successfully installed whole project at jdk 17 on platform macos. but still got the errors below:

2025-07-20T02:23:20.3825185Z Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
2025-07-20T02:23:20.3825779Z javac: invalid target release: 17
2025-07-20T02:23:20.3826042Z Usage: javac <options> <source files>
2025-07-20T02:23:20.3826311Z use -help for a list of possible options

@zrlw
Copy link
Contributor

zrlw commented Jul 20, 2025

modify all pom.xml files that contains dubbo-spring6-security, just do what dubbo-spring6-security did.

@MoritzArena
Copy link
Contributor Author

modify all pom.xml files that contains dubbo-spring6-security, just do what dubbo-spring6-security did.

really thx a lot

@zrlw
Copy link
Contributor

zrlw commented Jul 20, 2025

you'd better to search maven articles to know how to use profiles to specify which dependencies should be included and which ones should be excluded based on the currently active profile.

@MoritzArena
Copy link
Contributor Author

you'd better to search maven articles to know how to use profiles to specify which dependencies should be included and which ones should be excluded based on the currently active profile.

What confuses me is that I did lock the new dubbo-mutiny module to the jdk-version-ge-17 profile, and it compiles successfully with maven under jdk 1.8, jdk 11, jdk 17, jdk 21, and jdk 24 (with the correct profile). I don't know why I can't find the corresponding jdk version in the Github Action.

@zrlw
Copy link
Contributor

zrlw commented Jul 20, 2025

What confuses me is that I did lock the new dubbo-mutiny module to the jdk-version-ge-17 profile, and it compiles successfully with maven under jdk 1.8, jdk 11, jdk 17, jdk 21, and jdk 24 (with the correct profile). I don't know why I can't find the corresponding jdk version in the Github Action.

no, you didn't lock it. you also add it to the dependencies for building dubbo with
every jdk version which will make your lock trying no sense.
see details at new reviews.

@MoritzArena
Copy link
Contributor Author

dependencies for building

Sorry about that, I forgot to remove this module from top.

@zrlw
Copy link
Contributor

zrlw commented Jul 20, 2025

do what it did includes don't do what it didn't

@zrlw zrlw requested review from AlbumenJ, gnl00 and oxsean and removed request for gnl00 July 21, 2025 01:08
@zrlw
Copy link
Contributor

zrlw commented Jul 21, 2025

the version of io.smallrye.reactive/mutiny has been set at dubbo-dependencies-bom, dubbo-plugin/dubbo-mutiny should not set it again.

@MoritzArena
Copy link
Contributor Author

the version of io.smallrye.reactive/mutiny has been set at dubbo-dependencies-bom, dubbo-plugin/dubbo-mutiny should not set it again.

got it

@zrlw zrlw self-requested a review July 21, 2025 22:59
@zrlw zrlw requested review from RainYuY and heliang666s July 23, 2025 04:50
@zrlw zrlw added type/proposal Everything you want Dubbo have component/sdk Related with apache/dubbo labels Jul 23, 2025
@RainYuY
Copy link
Member

RainYuY commented Jul 27, 2025

@oxsean PTAL

@zrlw zrlw requested a review from gnl00 July 28, 2025 02:10
Copy link
Contributor

@oxsean oxsean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have a example to showcase these capabilities.

@MoritzArena
Copy link
Contributor Author

It would be good to have a example to showcase these capabilities.

these will done in this week

@zrlw zrlw merged commit 5b9adb0 into apache:3.3 Aug 26, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/sdk Related with apache/dubbo type/proposal Everything you want Dubbo have

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants