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
The example provides dependencies and instructions to demonstrate several distinct invocation models:
8
+
The example consists of a class https://github.com/spring-cloud/spring-cloud-function/blob/master/spring-cloud-function-samples/function-sample-cloudevent/src/main/java/io/spring/cloudevent/CloudeventDemoApplication.java[CloudeventDemoApplication]
9
+
which contains a set of function beans of different type signatures which you can interact with following instructions below.
10
+
11
+
It also provides necessary dependencies and instructions to demonstrate several distinct invocation models:
9
12
10
13
- _Direct function invocation_
11
14
- _Function as a REST endpoint_
12
15
- _Function as message handler (e.g., Kafka, RabbitMQ etc)_
13
16
- _Function invocation via RSocket_
14
17
15
-
The POM file defines all the necessary dependency in a segregated way, so you can choose the one you're interested in.
18
+
The POM file defines all the necessary dependency in a segregated way, so you can choose the one you're interested in by commenting in/out dependencies
19
+
that fit your scenario (e.g., Streaming vs. REST, ect_
16
20
17
21
### Direct function invocation
18
22
@@ -40,7 +44,7 @@ provides a good example on how to accomplish this.
40
44
Given that SCF allows function to be exposed as REST endpoints, you can post cloud event to any of the
41
45
functions by using function name as path (e.g., `localhost:8080/<function_name>`).
42
46
43
-
Just add this to your dependency
47
+
Just add this to your dependency (or in your case simply un-comment)
Feel free to change the function you're invoking by changing URI path (e.g., `localhost:8080/asString` to `localhost:8080/consumeAndProduceCloudEventAsPojoToPojo`).
98
+
93
99
### Function as message handler (e.g., Kafka, RabbitMQ etc)
94
100
95
101
Streaming support for Apache Kafka and RabbitMQ is provided via https://spring.io/projects/spring-cloud-stream[Spring Cloud Stream] framework.
0 commit comments