Skip to content

Commit 7bf7727

Browse files
committed
ix(event-gateway): productize kafka topics capture the variables
1 parent 6bde1be commit 7bf7727

File tree

1 file changed

+10
-25
lines changed

1 file changed

+10
-25
lines changed

app/_how-tos/event-gateway/productize-kafka-topics.md

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,11 @@ body:
114114
extract_body:
115115
- name: id
116116
variable: BACKEND_CLUSTER_ID
117+
capture: BACKEND_CLUSTER_ID
118+
jq: ".id"
117119
{% endkonnect_api_request %}
118120
<!--vale on-->
119121

120-
Export the backend cluster ID to your environment:
121-
```sh
122-
export BACKEND_CLUSTER_ID="YOUR-BACKEND-CLUSTER-ID"
123-
```
124-
125122
## Create an analytics virtual cluster
126123

127124
Use the following command to create the first virtual cluster for the `analytics` category:
@@ -155,17 +152,13 @@ body:
155152
extract_body:
156153
- name: id
157154
variable: ANALYTICS_VC_ID
155+
capture: ANALYTICS_VC_ID
156+
jq: ".id"
158157
{% endkonnect_api_request %}
159158
<!--vale on-->
160159

161160
This virtual cluster provides access to topics with the `analytics_` prefix, and the `user_actions` topic.
162161

163-
Export the virtual cluster ID to your environment:
164-
165-
```sh
166-
export ANALYTICS_VC_ID="YOUR-ANALYTICS-VIRTUAL-CLUSTER-ID"
167-
```
168-
169162
## Create a payments virtual cluster
170163

171164
Now create the `payments` virtual cluster:
@@ -199,16 +192,13 @@ body:
199192
extract_body:
200193
- name: id
201194
variable: PAYMENTS_VC_ID
195+
capture: PAYMENTS_VC_ID
196+
jq: ".id"
202197
{% endkonnect_api_request %}
203198
<!--vale on-->
204199

205200
This virtual cluster will be used to access topics with the `payments_` prefix, and the `user_actions` topic.
206201

207-
Export the virtual cluster ID to your environment:
208-
```sh
209-
export PAYMENTS_VC_ID="YOUR-PAYMENTS-VIRTUAL-CLUSTER-ID"
210-
```
211-
212202
## Create an analytics listener with a policy
213203

214204
For testing purposes, we'll use **port forwarding** to route traffic to each virtual cluster.
@@ -230,14 +220,11 @@ body:
230220
extract_body:
231221
- name: id
232222
variable: ANALYTICS_LISTENER_ID
223+
capture: ANALYTICS_LISTENER_ID
224+
jq: ".id"
233225
{% endkonnect_api_request %}
234226
<!--vale on-->
235227

236-
Export the listener ID to your environment:
237-
```sh
238-
export ANALYTICS_LISTENER_ID="YOUR-ANALYTICS-LISTENER-ID"
239-
```
240-
241228
Create the [port mapping policy](/event-gateway/policies/forward-to-virtual-cluster/):
242229

243230
<!--vale off-->
@@ -274,13 +261,11 @@ body:
274261
extract_body:
275262
- name: id
276263
variable: PAYMENTS_LISTENER_ID
264+
capture: PAYMENTS_LISTENER_ID
265+
jq: ".id"
277266
{% endkonnect_api_request %}
278267
<!--vale on-->
279268

280-
Export the listener ID to your environment:
281-
```sh
282-
export PAYMENTS_LISTENER_ID="YOUR-PAYMENTS-LISTENER-ID"
283-
```
284269
Create the port mapping policy:
285270

286271
<!--vale off-->

0 commit comments

Comments
 (0)