Knative Eventing is a system that is designed to address a common need for cloud native development and provides composable primitives to enable late-binding event sources and event consumers.
Knative Eventing supports multiple modes of usage. The following scenarios are well-supported by the existing components; since the system is modular, it's also possible to combine the components in novel ways.
I just want to publish events, I don't care who consumes them. Send events to a Broker as an HTTP POST. The SinkBinding can be useful to decouple the destination configuration from your application.
I just want to consume events like X, I don't care how they are published. Use a Trigger to consume events from a Broker based on CloudEvents attributes. Your application will receive the events as an HTTP POST.
I want to transform events through a series of steps. Use Channels and Subscriptions to define complex message-passing topologies. For simple pipelines, the Sequence automates construction of Channels and Subscriptions between each stage.
Knative also supports some additional patterns such as Parallel fanout of events, and routing response events from both Channels and Brokers.
Knative Eventing is designed around the following goals:
To enable delivery to multiple types of Services, Knative Eventing defines two generic interfaces that can be implemented by multiple Kubernetes resources:
status.address.url
field. As a special case, the core
Kubernetes Service object
also fulfils the Addressable interface.To learn about using event sources, see the event sources documentation.
Broker and Trigger objects make it easy to filter events based on event attributes.
A Broker provides a bucket of events which can be selected by attribute. It
receives events and forwards them to subscribers defined by one or more matching
Triggers. Since a Broker implements Addressable, event senders can submit events
to the Broker by POSTing the event to the Broker's status.address.url
.
A Trigger describes a filter on event attributes which should be delivered to an Addressable. You can create as many Triggers as necessary.
For most use cases, a single bucket (Broker) per namespace is sufficient, but there are serveral use cases where multiple buckets (Brokers) can simplify architecture. For example, separate Brokers for events containing Personally Identifiable Information (PII) and non-PII events can simplify audit and access control rules.
Knative Eventing defines an EventType object to make it easier for consumers to discover the types of events they can consume from Brokers.
The registry consists of a collection of event types. The event types stored in the registry contain (all) the required information for a consumer to create a Trigger without resorting to some other out-of-band mechanism.
To learn how to use the registry, see the Event Registry documentation.
The SinkBinding custom object supports decoupling event production from delivery addressing.
When you create a SinkBinding, you reference an Addressable and a Kubernetes
object which provides a PodTemplateSpec. The SinkBinding will inject environment
variables ($K_SINK
for the destination URL) into the PodTemplateSpec so that
the application code does not need to interact with the Kubernetes API to locate
the event destination.
Knative Eventing also defines an event forwarding and persistence layer, called a Channel. Each channel is a separate Kubernetes Custom Resource. Events are delivered to Services or forwarded to other channels (possibly of a different type) using Subscriptions. This allows message delivery in a cluster to vary based on requirements, so that some events might be handled by an in-memory implementation while others would be persisted using Apache Kafka or NATS Streaming.
See the List of Channel implementations.
There are cases where you may want to utilize a set of co-operating functions together and for those use cases, Knative Eventing provides two additional resources:
The focus for the next Eventing release will be to enable easy implementation of event sources. Sources manage registration and delivery of events from external systems using Kubernetes Custom Resources. Learn more about Eventing development in the Eventing work group.
Follow the instructions to install on the platform of your choice.
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )