-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.yaml
117 lines (116 loc) · 3.72 KB
/
module.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: "3.0"
module:
meta:
type: remote
spec:
endpoints:
- endpoint:
meta:
kind: http
spec:
functions: com.store.fn/*
urlPathTemplate: http://store:8000/statefun
timeouts:
call: 2 min
- endpoint:
meta:
kind: http
spec:
functions: com.warehouse.fn/*
urlPathTemplate: http://warehouse:8001/statefun
timeouts:
call: 2 min
- endpoint:
meta:
kind: http
spec:
functions: com.payments.fn/*
urlPathTemplate: http://payments:8002/statefun
timeouts:
call: 2 min
ingresses:
- ingress:
meta:
type: io.statefun.kafka/ingress
id: com.bookstore.ingress/orders
spec:
address: kafka:9092
consumerGroupId: bookstores
topics:
- topic: orders
valueType: com.bookstore.types/Order
targets:
- com.store.fn/order
- com.warehouse.fn/order
- topic: payment-updates
valueType: com.bookstore.types/Payment
targets:
- com.store.fn/order-updates
- ingress:
meta:
type: io.statefun.kafka/ingress
id: com.payments/orders
spec:
address: kafka:9092
consumerGroupId: payment-gateways
topics:
- topic: payments
valueType: com.bookstore.types/Payment
targets:
- com.payments.fn/process
# - ingress:
# meta:
# type: io.statefun.kafka/ingress
# id: com.payments/test
# spec:
# address: kafka:9092
# consumerGroupId: warehouses
# topics:
# - topic: orders
# valueType: com.bookstore.types/order
# targets:
# - com.store.fn/test
egresses:
- egress:
meta:
type: io.statefun.kafka/egress
id: com.bookstore/coms
spec:
address: kafka:9092
deliverySemantic:
type: exactly-once
transactionTimeoutMillis: 100000
# egress to payments services
- egress:
meta:
type: io.statefun.kafka/egress
id: com.payments/orders
spec:
address: kafka:9092
deliverySemantic:
type: exactly-once
transactionTimeoutMillis: 100000
# egress that connects itself to one of the ingress
- egress:
meta:
type: io.statefun.kafka/egress
id: com.bookstore.ingress/orders
spec:
address: kafka:9092
deliverySemantic:
type: exactly-once
transactionTimeoutMillis: 100000