diff --git a/docs/eventing/channels/subscriptions.md b/docs/eventing/channels/subscriptions.md index 72ad5e30b..40d602b85 100644 --- a/docs/eventing/channels/subscriptions.md +++ b/docs/eventing/channels/subscriptions.md @@ -15,7 +15,7 @@ For more information about Subscription objects, see === "kn" Create a Subscription between a Channel and a Sink by running: - ``` + ```bash kn subscription create \ --channel : \ --sink : \ @@ -68,29 +68,38 @@ For more information about Subscription objects, see apiVersion: messaging.knative.dev/v1 kind: Subscription metadata: - name: # Name of the Subscription. + name: + # Name of the Subscription. namespace: default spec: channel: apiVersion: messaging.knative.dev/v1 kind: Channel - name: # Configuration settings for the Channel that the Subscription connects to. + name: + # Name of the Channel that the Subscription connects to. delivery: + # Optional delivery configuration settings for events. deadLetterSink: + # When this is configured, events that failed to be consumed are sent to the deadLetterSink. + # The event is dropped, no re-delivery of the event is attempted, and an error is logged in the system. + # The deadLetterSink value must be a Destination. ref: apiVersion: serving.knative.dev/v1 kind: Service name: - # Configuration settings for event delivery. - # This tells the Subscription what happens to events that cannot be delivered to the Subscriber. - # When this is configured, events that failed to be consumed are sent to the deadLetterSink. - # The event is dropped, no re-delivery of the event is attempted, and an error is logged in the system. - # The deadLetterSink value must be a Destination. + reply: + # Optional configuration settings for the reply event. + # This is the event Sink that events replied from the subscriber are delivered to. + ref: + apiVersion: messaging.knative.dev/v1 + kind: InMemoryChannel + name: subscriber: + # Required configuration settings for the Subscriber. This is the event Sink that events are delivered to from the Channel. ref: apiVersion: serving.knative.dev/v1 kind: Service - name: # Configuration settings for the Subscriber. This is the event Sink that events are delivered to from the Channel. + name: ``` 1. Apply the YAML file by running the command: @@ -107,13 +116,13 @@ You can list all existing Subscriptions by using the `kn` CLI tool. - List all Subscriptions: - ``` + ```bash kn subscription list ``` - List Subscriptions in YAML format: - ``` + ```bash kn subscription list -o yaml ``` @@ -121,7 +130,7 @@ You can list all existing Subscriptions by using the `kn` CLI tool. You can print details about a Subscription by using the `kn` CLI tool: -``` +```bash kn subscription describe ``` @@ -132,13 +141,13 @@ kn subscription describe You can delete a Subscription by using the `kn` or `kubectl` CLI tools. === "kn" - ``` + ```bash kn subscription delete ``` === "kubectl" - ``` + ```bash kubectl subscription delete ```