Use ClusterEventBus
This document describes how to use a ClusterEventBus.
Prerequisites
You have finished the steps described in Use EventBus and Trigger.
Use a ClusterEventBus
Use the following content to create a ClusterEventBus configuration file (for example,
clustereventbus.yaml
).apiVersion: events.openfunction.io/v1alpha1
kind: ClusterEventBus
metadata:
name: default
spec:
natsStreaming:
natsURL: "nats://nats.default:4222"
natsStreamingClusterID: "stan"
subscriptionType: "queue"
durableSubscriptionName: "ImDurable"
Run the following command to delete EventBus.
kubectl delete eventbus.events.openfunction.io default
Run the following command to apply the configuration file.
kubectl apply -f clustereventbus.yaml
Run the following commands to check the results.
$ kubectl get eventbus.events.openfunction.io
No resources found in default namespace.
$ kubectl get clustereventbus.events.openfunction.io
NAME AGE
default 21s
当前内容版权归 OpenFunction 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 OpenFunction .