Skip to content

Commit a30cb76

Browse files
authored
Update README.md
1 parent 6e5d08b commit a30cb76

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,22 @@ Don't forget to add the implementation dependency to the main spring boot module
131131
}
132132
```
133133

134+
### Request-Reply
135+
Example Code:
136+
137+
```java
138+
public Mono<AggregateResponse> queryInformation() {
139+
AsyncQuery<String> userQuery = new AsyncQuery<>("user.byId", "42");
140+
AsyncQuery<String> projectQuery = new AsyncQuery<>("project.byId", "343");
141+
AsyncQuery<String> productQuery = new AsyncQuery<>("product.byId", "22");
142+
143+
Mono<User> user = gateway.requestReply(userQuery, "Users", User.class);
144+
Mono<Project> project = gateway.requestReply(projectQuery, "Projects", Project.class);
145+
Mono<Product> product = gateway.requestReply(productQuery, "Products", Product.class);
146+
147+
return zip(user, project, product).map(function(this::aggregate));
148+
}
149+
```
134150

135151

136152
## Disclaimer

0 commit comments

Comments
 (0)