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

  1. Use the following content to create a ClusterEventBus configuration file (for example, clustereventbus.yaml).

    1. apiVersion: events.openfunction.io/v1alpha1
    2. kind: ClusterEventBus
    3. metadata:
    4. name: default
    5. spec:
    6. natsStreaming:
    7. natsURL: "nats://nats.default:4222"
    8. natsStreamingClusterID: "stan"
    9. subscriptionType: "queue"
    10. durableSubscriptionName: "ImDurable"
  2. Run the following command to delete EventBus.

    1. kubectl delete eventbus.events.openfunction.io default
  3. Run the following command to apply the configuration file.

    1. kubectl apply -f clustereventbus.yaml
  4. Run the following commands to check the results.

    1. $ kubectl get eventbus.events.openfunction.io
    2. No resources found in default namespace.
    3. $ kubectl get clustereventbus.events.openfunction.io
    4. NAME AGE
    5. default 21s

Last modified June 18, 2022: Add function inputs and outputs docs (#105) (dd9d200)