Introducing the CloudEvents Player
Figure 6.6 from Knative in Action
Here, the CloudEvents Player is acting as both a and a Sink
for CloudEvents.
The CloudEvents Player acts as a Source for CloudEvents by intaking the URL of the Broker as an environment variable, BROKER_URL
. You will send CloudEvents to the Broker through the CloudEvents Player application.
Create the CloudEvents Player Service:
kn
Expected Output
Because we didn’t assign a , Knative Serving automatically created one for us. It’s okay if your Revision is named something different.
YAML
Once you’ve created your YAML file, named something like cloudevents-player.yaml
, apply it by running the command:
Expected Output
Examining the CloudEvents Player
You can use the CloudEvents Player to send and receive CloudEvents. If you open the Service URL in your browser, the Create Event form appears.
What do these fields mean?
For more information on the CloudEvents Specification, check out the .
- Fill in the form with whatever you data you want.
- Click SEND EVENT.
Clicking the shows you the CloudEvent as the Broker sees it.
The icon in the “Status” column implies that the event has been sent to our Broker… but where has the event gone? Well, right now, nowhere!