diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..0ad0c38
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,30 @@
+
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/1_feature_request.md b/.github/ISSUE_TEMPLATE/1_feature_request.md
new file mode 100644
index 0000000..5cc1309
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/1_feature_request.md
@@ -0,0 +1,27 @@
+---
+name: 'Feature request'
+about: 'Suggest a feature for the Reactor Extension'
+title:
+labels: 'Type: Feature'
+---
+
+
+
+### Feature Description
+
+
+
+### Current Behaviour
+
+
+
+### Wanted Behaviour
+
+
+
+### Possible Workarounds
+
+
diff --git a/.github/ISSUE_TEMPLATE/2_enhancement_request.md b/.github/ISSUE_TEMPLATE/2_enhancement_request.md
new file mode 100644
index 0000000..da39cec
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/2_enhancement_request.md
@@ -0,0 +1,24 @@
+---
+name: 'Enhancement request'
+about: 'Suggest an enhancement/change to an existing feature for the Reactor Extension'
+title:
+labels: 'Type: Enhancement'
+---
+
+
+
+### Enhancement Description
+
+
+
+### Current Behaviour
+
+
+
+### Wanted Behaviour
+
+
+
+### Possible Workarounds
+
+
diff --git a/.github/ISSUE_TEMPLATE/3_bug_report.md b/.github/ISSUE_TEMPLATE/3_bug_report.md
new file mode 100644
index 0000000..565bd30
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/3_bug_report.md
@@ -0,0 +1,33 @@
+---
+name: 'Bug report'
+about: 'Report a bug for the Reactor Extension'
+title:
+labels: 'Type: Bug'
+---
+
+
+
+### Basic information
+
+* Axon Framework version:
+* JDK version:
+* Reactor Extension version:
+* Complete executable reproducer if available (e.g. GitHub Repo):
+
+### Steps to reproduce
+
+
+
+### Expected behaviour
+
+
+
+### Actual behaviour
+
+
diff --git a/.github/close-label.yml b/.github/close-label.yml
new file mode 100644
index 0000000..8ed15ea
--- /dev/null
+++ b/.github/close-label.yml
@@ -0,0 +1,4 @@
+"Type: Bug": "Status: Resolved"
+"Type: Enhancement": "Status: Resolved"
+"Type: Feature": "Status: Resolved"
+"Type: Dependency Upgrade": "Status: Resolved"
\ No newline at end of file
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..d0042b7
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,18 @@
+version: 2
+updates:
+- package-ecosystem: maven
+ directory: "/"
+ schedule:
+ interval: daily
+ open-pull-requests-limit: 5
+ # Specify labels for pull requests
+ labels:
+ - "Type: Dependency Upgrade"
+ - "Priority 1: Must"
+ - "Status: In Progress"
+ # Add reviewers
+ reviewers:
+ - "m1l4n54v1c"
+ - "saratry"
+ - "stefanvozd"
+ milestone: 2
\ No newline at end of file
diff --git a/.github/release-notes.yml b/.github/release-notes.yml
new file mode 100644
index 0000000..bfd1dbc
--- /dev/null
+++ b/.github/release-notes.yml
@@ -0,0 +1,20 @@
+releasenotes:
+ sections:
+ - title: "Features"
+ emoji: ":star:"
+ labels: [ "Type: Feature" ]
+ - title: "Enhancements"
+ emoji: ":chart_with_upwards_trend:"
+ labels: [ "Type: Enhancement" ]
+ - title: "Bug Fixes"
+ emoji: ":beetle:"
+ labels: [ "Type: Bug" ]
+ - title: "Dependency Upgrade"
+ emoji: ":hammer_and_wrench:"
+ labels: [ "Type: Dependency Upgrade" ]
+ issues:
+ exclude:
+ labels: [ "Type: Incorrect Repository", "Type: Question" ]
+ contributors:
+ exclude:
+ names: [ "dependabot" ]
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 0000000..387f51a
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,93 @@
+name: Reactor Extension
+
+on:
+ push:
+ branches:
+ - master
+ - axon-reactor-*.*.x
+ pull_request:
+
+jobs:
+ build:
+ name: Test and Build on JDK ${{ matrix.java-version }}
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ include:
+ - java-version: 8
+ sonar-enabled: false
+ deploy: true
+ - java-version: 11
+ sonar-enabled: true
+ deploy: false
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up JDK ${{ matrix.java-version }}
+ uses: actions/setup-java@v1.4.3
+ with:
+ java-version: ${{ matrix.java-version }}
+ server-id: sonatype
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+
+ - name: Cache .m2
+ uses: actions/cache@v2.1.3
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven
+
+ - name: Maven operation with Sonar
+ if: matrix.sonar-enabled
+ run: |
+ mvn -B -U -Pcoverage \
+ clean verify \
+ sonar:sonar \
+ -Dsonar.projectKey=AxonFramework_extension-reactor \
+ -Dsonar.organization=axonframework \
+ -Dsonar.host.url=https://sonarcloud.io \
+ -Dsonar.login=${{ secrets.SONAR_TOKEN }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Maven operation without Sonar
+ if: matrix.sonar-enabled != true
+ run: |
+ mvn -B -U clean verify
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Deploy to Sonatype
+ if: github.github.head_ref == null && success() && matrix.deploy
+ run: |
+ ./mvnw -B -U deploy -DskipTests=true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ MAVEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_ID }}
+ MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASS }}
+
+ - name: Notify success to Slack
+ if: success()
+ env:
+ SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
+ uses: voxmedia/github-action-slack-notify-build@v1.1.2
+ with:
+ channel_id: CAGSEC92A
+ status: SUCCESS
+ color: good
+
+ - name: Notify failure to Slack
+ if: failure()
+ env:
+ SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
+ uses: voxmedia/github-action-slack-notify-build@v1.1.2
+ with:
+ channel_id: CAGSEC92A
+ status: FAILED
+ color: danger
diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml
new file mode 100644
index 0000000..b4b5039
--- /dev/null
+++ b/.github/workflows/release-notes.yml
@@ -0,0 +1,33 @@
+# Trigger the workflow on milestone events
+on:
+ milestone:
+ types: [closed]
+name: Milestone Closure
+jobs:
+ create-release-notes:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@master
+ - name: Create Release Notes Markdown
+ uses: docker://decathlon/release-notes-generator-action:2.1.0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
+ OUTPUT_FOLDER: temp_release_notes
+ USE_MILESTONE_TITLE: "true"
+ - name: Get the name of the created Release Notes file and extract Version
+ run: |
+ RELEASE_NOTES_FILE=$(ls temp_release_notes/*.md | head -n 1)
+ echo "RELEASE_NOTES_FILE=$RELEASE_NOTES_FILE" >> $GITHUB_ENV
+ VERSION=$(echo ${{ github.event.milestone.title }} | cut -d' ' -f2)
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
+ - name: Create a Draft Release Notes on GitHub
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
+ with:
+ tag_name: axon-reactor-${{ env.VERSION }}
+ release_name: Axon Reactor Extension v${{ env.VERSION }}
+ body_path: ${{ env.RELEASE_NOTES_FILE }}
+ draft: true
diff --git a/.gitignore b/.gitignore
index 9cfaab9..51fa1f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,7 +26,10 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
+# Maven build artifacts can be ignored
target/
+# ...but keep the wrapper jar
+!.mvn/wrapper/maven-wrapper.jar
# Eclipse project files
.classpath
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 0000000..c6feb8b
Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..c2195a6
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1 @@
+distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index bf21e0c..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# We want to run this on Ubuntu 18.04 LTS
-dist: bionic
-
-language: java
-
-sudo: required
-
-services:
- - docker
-
-jobs:
- include:
- - name: "JDK 8"
- jdk: openjdk8
- env: MVN_BUILD_SCRIPT="clean verify"
- - name: "JDK 11 with Sonar analysis"
- jdk: openjdk11
- env: MVN_BUILD_SCRIPT="-Pcoverage clean verify sonar:sonar -Dsonar.projectKey=AxonFramework_extension-reactor"
-
-install: true
-
-cache:
- directories:
- - $HOME/.m2
-
-# We switch JDK by setting the JAVA_HOME environment variable. All JDKs are under the same base directory.
-script:
- - mvn -version
- - mvn -B -U $MVN_BUILD_SCRIPT
-
-notifications:
- slack:
- secure: d1HN9GBeH0e6EsHjNkPVXgBaFCYqbvjkZv9GUkpWnyjNYP5V1snSk6sO4X6ONttydgzfbElZTOfrgDzRTgWJ76iDMxAPccFPY7dmGcpw8/2TOjwP6H6yEitiiZcWR9fssTM2Li2WQtuGkwaVBhw15JNABzEsexxqXC+Cu48yUfA=
-
-addons:
- sonarcloud:
- organization: "axonframework"
- token:
- secure: "htYEusSkwB7bvgURS8FU8CBFmIlJcfSVhA6dZQ5uF3m3KYltT8D6zC4/O9aRw/2dId0lPMC5T6XiRLkmJsa3hLJhsbnrOW+8UXyzWq6SZfuVngRAXKeo5sqrv+7XXyIir5kbq0WSgs4UBJfxUIIDynfDupE9Y4MfZAQRA0FrupkEwwV4sp+QQKIymYFO84iPgwvlHpcn+KDMI0LNtLa6+kKJuuL5u4HsKHA4tTWBDP5aSBZL2dRNt1YM8+poO3pXH+fqTW21X7qq2GfoDfyLdfWtodT9TfREBQWgJcX6dXc3yLruPMnY7wzvNZUVF7bDDjIg9rcfARLLyBDutDGtiovqilKjes5JbsjEweRw9CpLq86UqIN1Sn1dHf40ieuvuU6hDyOCRAYwbP2/DZtN5eFyVJgUKY4NpcAewOODI3KMVTrhEeVjET8uvFsKT1Phsph3Ii/qhamED5+Yqvu+0974hQq0C3jXtDaM9xKC9ViaK1Bw1Q8P6EwGUvTEDFzsEPsSpg03G0EXQoOlikk5AbgjIEhDzeD9/UQvXv8qL5DM9N9nD/fH8ELa0ma5GHzMwK9WrkjjsYmeppjyT/wJHvb0MHAZxkJvq4izHvAZmvkusBEAOGpZHGRhDdGSR59zDMT1B7d8SLLk8OH9bFVEYh7rtFeNzwl6mzaGPFO7aWc="
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 66e0278..13bb26c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,40 +1,38 @@
-# Contribution guidelines
+# Contribution Guidelines
-Thank you for your interest in contributing to the Axon Framework. To make sure using Axon is a smooth experience for
-everybody, we've set up a number of guidelines to follow.
+Thank you for your interest in contributing to the Axon Framework Reactor Extension. To make sure using Axon is a smooth
+experience for everybody, we've set up a number of guidelines to follow.
There are different ways in which you can contribute to the framework:
- 1. You can report any bugs, feature requests or ideas about improvements on our issue page: https://github.com/AxonFramework/extension-reactor/issues.
- All ideas are welcome. Please be as exact as possible when reporting bugs. This will help us reproduce and thus solve
- the problem faster.
- 1. If you have created a component for your own application that you think might be useful to include in the
- framework, send us a pull request (or patch or a zip containing the source code). We will evaluate it and try to
- fit it in the framework. Please make sure code is properly documented using javadoc. This helps us to understand
- what is going on.
- 1. If you know of any other way you think you can help us, do not hesitate to send a message to the
- [Axon Framework mailinglist](axonframework@googlegroups.com).
+1. You can report any bugs, feature requests or ideas about improvements on
+ our [issue page](https://github.com/AxonFramework/extension-reactor/issues/new/choose). All ideas are welcome. Please
+ be as exact as possible when reporting bugs. This will help us reproduce and thus solve the problem faster.
+2. If you have created a component for your own application that you think might be useful to include in the framework,
+ send us a pull request (or a patch / zip containing the source code). We will evaluate it and try to fit it in the
+ framework. Please make sure code is properly documented using JavaDoc. This helps us to understand what is going on.
+3. If you know of any other way you think you can help us, do not hesitate to send a message to
+ the [AxonIQ's discussion platform](https://discuss.axoniq.io/).
-## Code contributions
+## Code Contributions
If you're contributing code, please take care of the following:
### Contributor Licence Agreement
To keep everyone out of trouble (both you and us), we require that all contributors (digitally) sign a Contributor
-License Agreement. Basically, the agreement says that we may freely use the code you contribute to the Axon Framework,
-and that we won't hold you liable for any unfortunate side effects that the code may cause.
+License Agreement. Basically, the agreement says that we may freely use the code you contribute to the Axon Framework
+Reactor Extension, and that we won't hold you liable for any unfortunate side effects that the code may cause.
-To sign the CLA, visit: https://www.clahub.com/agreements/AxonFramework/extension-reactor.
+To sign the CLA, visit: https://cla-assistant.io/AxonFramework/extension-reactor
-### Code style
-
-We're trying very hard to maintain a consistent style of coding throughout the code base. Think of things like
-indenting using 4 spaces, putting opening brackets (the '{') on the same line and putting proper Javadoc on all
-non-private members.
-
-If you're using IntelliJ IDEA, you can download the code style definition from
-http://www.axonframework.org/axon_code_style.xml. Simply copy the file to ~/.IntelliJIdea13/config/codestyles. After
-(re)starting IntelliJ, you can pick this code style from the project settings.
+### Code Style
+We're trying very hard to maintain a consistent style of coding throughout the code base. Think of things like indenting
+using 4 spaces, putting opening brackets (the '{') on the same line and putting proper JavaDoc on all non-private
+members.
+If you're using IntelliJ IDEA, you can download the code style
+definition [here](https://github.com/AxonFramework/AxonFramework/blob/master/axon_code_style.xml). Simply import the XML
+file in under "Settings -> Code Style -> Scheme -> Import Scheme". Doing so should make the code style selectable
+immediately.
diff --git a/README.md b/README.md
index 2465931..6bf0120 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,7 @@
-# Axon Framework - Reactor Extension [![Build Status](https://travis-ci.org/AxonFramework/extension-reactor.svg?branch=master)](https://travis-ci.org/AxonFramework/extension-reactor)
+# Axon Framework - Reactor Extension
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.axonframework.extensions.reactor/axon-reactor/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.axonframework.extensions.reactor/axon-reactor/)
+![Build Status](https://github.com/AxonFramework/extension-reactor/workflows/Reactor%20Extension/badge.svg?branch=master)
+[![SonarCloud Status](https://sonarcloud.io/api/project_badges/measure?project=AxonFramework_extension-reactor&metric=alert_status)](https://sonarcloud.io/dashboard?id=AxonFramework_extension-reactor)
Axon Framework is a framework for building evolutionary, event-driven microservice systems,
based on the principles of Domain Driven Design, Command-Query Responsibility Segregation (CQRS) and Event Sourcing.
@@ -31,9 +34,10 @@ There are a couple of things to consider when you're traversing anything Axon:
as the majority of possible scenarios you might encounter when using Axon should be covered there.
* If the Reference Guide does not cover a specific topic you would've expected,
we'd appreciate if you could file an [issue](https://github.com/AxonIQ/reference-guide/issues) about it for us.
-* There is a a [public mailing list](https://groups.google.com/forum/#!forum/axonframework) to support you in the case
- the reference guide did not sufficiently answer your question.
-* Next to the mailing list we also monitor Stack Overflow for any questions which are tagged with `axon`.
+* There is a [forum](https://discuss.axoniq.io/) to support you in the case the reference guide did not sufficiently answer your question.
+Axon Framework and Server developers will help out on a best effort basis.
+Know that any support from contributors on posted question is very much appreciated on the forum.
+* Next to the forum we also monitor Stack Overflow for any questions which are tagged with `axon`.
## Feature requests and issue reporting
@@ -51,4 +55,3 @@ When filing features:
* (Pseudo-)Code snippets showing what it might look like help us understand your suggestion better
* If you have any thoughts on where to plug this into the framework, that would be very helpful too
* Lastly, we value contributions to the framework highly. So please provide a Pull Request as well!
-
\ No newline at end of file
diff --git a/axon-reactor-spring-boot-autoconfigure/pom.xml b/axon-reactor-spring-boot-autoconfigure/pom.xml
index f4cefc7..a6476a8 100644
--- a/axon-reactor-spring-boot-autoconfigure/pom.xml
+++ b/axon-reactor-spring-boot-autoconfigure/pom.xml
@@ -19,7 +19,7 @@
axon-reactor-parentorg.axonframework.extensions.reactor
- 4.4.3-SNAPSHOT
+ 4.5-SNAPSHOT4.0.0
@@ -58,7 +58,7 @@
org.junit.jupiter
- junit-jupiter-api
+ junit-jupitertest
diff --git a/axon-reactor-spring-boot-starter/pom.xml b/axon-reactor-spring-boot-starter/pom.xml
index aa23b61..009473d 100644
--- a/axon-reactor-spring-boot-starter/pom.xml
+++ b/axon-reactor-spring-boot-starter/pom.xml
@@ -19,14 +19,14 @@
org.springframework.bootspring-boot-starters
- 2.2.6.RELEASE
+ 2.2.13.RELEASE4.0.0org.axonframework.extensions.reactoraxon-reactor-spring-boot-starter
- 4.4.3-SNAPSHOT
+ 4.5-SNAPSHOTAxon Framework Reactor Extension - Spring Boot Starter
@@ -105,7 +105,7 @@
maven-resources-plugin
- 3.0.1
+ 3.2.0UTF-8
@@ -116,7 +116,7 @@
maven-compiler-plugin
- 3.5.1
+ 3.8.11.8
@@ -125,7 +125,7 @@
maven-javadoc-plugin
- 2.10.4
+ 3.2.0attach-javadoc
diff --git a/axon-reactor/pom.xml b/axon-reactor/pom.xml
index 82250d9..46b1dc9 100644
--- a/axon-reactor/pom.xml
+++ b/axon-reactor/pom.xml
@@ -19,7 +19,7 @@
axon-reactor-parentorg.axonframework.extensions.reactor
- 4.4.3-SNAPSHOT
+ 4.5-SNAPSHOT4.0.0
diff --git a/axon-reactor/src/main/java/org/axonframework/extensions/reactor/commandhandling/gateway/DefaultReactorCommandGateway.java b/axon-reactor/src/main/java/org/axonframework/extensions/reactor/commandhandling/gateway/DefaultReactorCommandGateway.java
index f137feb..723cb54 100644
--- a/axon-reactor/src/main/java/org/axonframework/extensions/reactor/commandhandling/gateway/DefaultReactorCommandGateway.java
+++ b/axon-reactor/src/main/java/org/axonframework/extensions/reactor/commandhandling/gateway/DefaultReactorCommandGateway.java
@@ -8,6 +8,8 @@
import org.axonframework.extensions.reactor.commandhandling.callbacks.ReactorCallback;
import org.axonframework.extensions.reactor.messaging.ReactorMessageDispatchInterceptor;
import org.axonframework.extensions.reactor.messaging.ReactorResultHandlerInterceptor;
+import org.axonframework.extensions.reactor.commandhandling.callbacks.ReactorCallback;
+import org.axonframework.messaging.MetaData;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.util.function.Tuple2;
@@ -68,13 +70,27 @@ public static Builder builder() {
@Override
public Mono send(Object command) {
//noinspection unchecked
- return Mono.>just(GenericCommandMessage.asCommandMessage(command))
+ return createCommandMessage(command)
.transform(this::processCommandInterceptors)
.flatMap(this::dispatchCommand)
.flatMap(this::processResultsInterceptors)
.transform(this::getPayload);
}
+ private Mono> createCommandMessage(Object command) {
+ return Mono.just(command)
+ .zipWith(metaDataFromContext())
+ .map(commandAndMeta -> GenericCommandMessage.asCommandMessage(commandAndMeta.getT1())
+ .andMetaData(commandAndMeta.getT2()));
+ }
+
+ private Mono metaDataFromContext() {
+ return Mono.subscriberContext()
+ .handle((ctx,sink) -> sink.next(Objects.requireNonNull(
+ ctx.getOrDefault(MetaData.class, MetaData.emptyInstance())
+ )));
+ }
+
@Override
public Registration registerDispatchInterceptor(ReactorMessageDispatchInterceptor> interceptor) {
dispatchInterceptors.add(interceptor);
@@ -96,13 +112,15 @@ private Mono> processCommandInterceptors(Mono Mono, Flux>>> dispatchCommand(
CommandMessage commandMessage) {
- ReactorCallback reactorCallback = new ReactorCallback<>();
- CommandCallback callback = reactorCallback;
- if (retryScheduler != null) {
- callback = new RetryingCallback<>(callback, retryScheduler, commandBus);
- }
- commandBus.dispatch(commandMessage, callback);
- return Mono.just(commandMessage).zipWith(Mono.just(Flux.from(reactorCallback)));
+ return Mono.defer(()-> {
+ ReactorCallback reactorCallback = new ReactorCallback<>();
+ CommandCallback callback = reactorCallback;
+ if (retryScheduler != null) {
+ callback = new RetryingCallback<>(callback, retryScheduler, commandBus);
+ }
+ commandBus.dispatch(commandMessage, callback);
+ return Mono.just(commandMessage).zipWith(Mono.just(Flux.from(reactorCallback)));
+ });
}
private Mono extends CommandResultMessage>> processResultsInterceptors(
diff --git a/axon-reactor/src/main/java/org/axonframework/extensions/reactor/commandhandling/gateway/ReactorCommandGateway.java b/axon-reactor/src/main/java/org/axonframework/extensions/reactor/commandhandling/gateway/ReactorCommandGateway.java
index 8432299..d8736e8 100644
--- a/axon-reactor/src/main/java/org/axonframework/extensions/reactor/commandhandling/gateway/ReactorCommandGateway.java
+++ b/axon-reactor/src/main/java/org/axonframework/extensions/reactor/commandhandling/gateway/ReactorCommandGateway.java
@@ -26,10 +26,10 @@ public interface ReactorCommandGateway extends ReactorMessageDispatchInterceptor
/**
* Sends the given {@code command} once the caller subscribes to the command result. Returns immediately.
- *
+ *
* The given {@code command} is wrapped as the payload of a {@link CommandMessage} that is eventually posted on the
- * {@link CommandBus}, unless the {@code command} already implements {@link Message}. In that case, a
- * {@code CommandMessage} is constructed from that message's payload and {@link MetaData}.
+ * {@link CommandBus}, unless the {@code command} already implements {@link Message}. In that case, a {@code
+ * CommandMessage} is constructed from that message's payload and {@link MetaData}.
*
* @param command the command to dispatch
* @param the type of the command result
@@ -44,7 +44,6 @@ public interface ReactorCommandGateway extends ReactorMessageDispatchInterceptor
* @param commands a Publisher stream of commands to be dispatched
* @return a Flux of command results. An ordering of command results corresponds to an ordering of commands being
* dispatched
- *
* @see #send(Object)
* @see Flux#concatMap(Function)
*/
@@ -52,4 +51,5 @@ default Flux