liveBook · Manning

Trigger

As explained in Google Anthos in Action

A Knative Trigger is an eventing resource that filters brokered events and routes matching events to a target.

A Knative Trigger filters events captured by a Broker and routes matching events to a target Service. It separates event selection from event transport, allowing one Broker to serve multiple event-driven consumers. section 9.3.3

A Trigger defines:

  • The Broker from which it receives events. section 9.3.3
  • CloudEvent attributes used for filtering, such as type and source. section 9.3.3
  • A subscriber reference identifying the target Kubernetes or Knative Service. section 9.3.3

Route matching events to a service

A Trigger named helloworld-python listens to the default Broker, selects events with type dev.knative.samples.helloworld and source dev.knative.samples/helloworldsource, and sends matches to the helloworld-python Service. section 9.3.3

Figure 9.6 Knative Eventing resources
09-06

Use the architecture figure to trace events from external sources through a Broker and Trigger to a Service. section 9.3.3

How Google Anthos in Action covers it

How deep it goes
Defines Broker selection, attribute filtering, and subscriber routing, but does not detail controller or delivery internals.
Examples
Uses a helloworld-python Trigger filtering CloudEvent type and source before invoking a Service.
What it assumes
Assumes Brokers, event sources, CloudEvents, and target Services as surrounding Eventing resources.
What you can do after
Apply it via Knative Eventing to select event classes and route them to services.
How it connects
Connects Brokers, CloudEvents, event sources, and Kubernetes or Knative Services.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.