You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reactive-streams/readme.adoc
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,16 @@
2
2
3
3
This example shows some possible usages of the Camel reactive streams component.
4
4
5
+
=== Introduction
6
+
5
7
The following sample routes are started together in a spring-boot application (all routes use `reactor-core` as external reactive framework):
6
8
7
9
- **examples.basic.camel-to-reactor**: shows how data generated by Camel route can be consumed by a reactive application.
8
10
- **examples.basic.camel-to-reactor-in-out**: shows how Camel data can be processed by a reactive library and return back to Camel to complete the flow.
9
11
- **examples.basic.reactor-to-camel**: shows how data generated by a reactive application can be consumed by a Camel route.
10
12
- **examples.basic.reactor-to-camel-in-out**: shows how data generated by a reactive application can can be processed by Camel and return back to the library to complete the flow.
11
13
- **examples.client-api.rest**: shows how a rest service can be defined using the reactive streams client API only.
12
-
- **examples.client-api.workflow**: shows how multiple Camel endpoints can be used into a reactive streams processing flow.
14
+
- **examples.client-api.workflow**: shows how multiple Camel endpoints can be used into a reactive streams processing flow. It reads from an "input" named directory, filtering files containing "camel" as text as criteria before sending to an external system
13
15
- **examples.others.rest**: shows how `Publisher` classes can be used as parameters or return types in beans.
14
16
15
17
All routes are enabled by default, but they can be switched off by changing the `src/main/resources/application.yml` file.
@@ -21,6 +23,29 @@ You can run this example using
21
23
22
24
mvn spring-boot:run
23
25
26
+
In some cases the camel reactor streams routes can be verified during execution of application, but we can also verify the functionality of reactor subscriptions through some defined Rest APIs.
27
+
28
+
Rest API to retrieve informations about orders:
29
+
30
+
http://localhost:8080/camel/orders/1
31
+
http://localhost:8080/camel/orders/2
32
+
33
+
If we call:
34
+
35
+
----
36
+
curl http://localhost:8080/camel/orders/3
37
+
----
38
+
39
+
We should receive a message "Not Found" as result of Flux Reactor coded behaviour
40
+
41
+
Rest API for reactor managed calculator:
42
+
43
+
----
44
+
curl http://localhost:8080/camel/sum/23/31
45
+
----
46
+
47
+
Let verify "54" as result
48
+
24
49
=== Help and contributions
25
50
26
51
If you hit any problem using Camel or have some feedback, then please
Copy file name to clipboardExpand all lines: reactive-streams/src/main/java/org/apache/camel/example/reactive/streams/app/ReactiveStreamsSpringBootApp.java
0 commit comments