High-level components
Argo Events centers on three primary components that separate concerns for event capture, transport, and reaction:
Each component has a clear responsibility: EventSources handle ingestion and normalization, the EventBus provides decoupled transport, and Sensors orchestrate triggers once dependencies are satisfied.
Event sources
EventSources are the system’s ingress points — they connect to external producers and convert their native payloads into a consistent internal format. Common EventSource types:- Webhooks (GitHub, GitLab, generic HTTP)
- Cloud object storage notifications (e.g., AWS S3)
- Messaging systems (AWS SQS, SNS, Kafka, GCP Pub/Sub)
- Schedulers (time-based cron events)
- Custom providers or third-party services
- Listening/consuming events from external systems
- Normalizing events into the CloudEvents format (id, source, type, time, data, etc.)
Standardizing events to the CloudEvents spec simplifies downstream processing. CloudEvents provides a predictable envelope so Sensors and other consumers can reason about events without per-source parsing logic.
EventBus — the transport layer
After an EventSource converts an incoming event to CloudEvents, it publishes the event to the EventBus. The EventBus decouples producers and consumers using a publish/subscribe model and provides durability and scalability for event delivery. Popular EventBus implementations:
Argo Events uses these underlying messaging systems to route CloudEvents from EventSources to Sensors, allowing EventSources to simply publish without knowing which Sensors will consume the events.
NATS Streaming (STAN) is deprecated. For new deployments prefer NATS JetStream or Kafka, which provide better persistence and streaming semantics.
Sensor — the event consumer and orchestrator
Sensors subscribe to the EventBus to receive CloudEvents. A Sensor defines:- Event dependencies: which events (and conditions) must arrive
- Dependency evaluation: logic for combining or matching events (single, multiple, or grouped)
- Triggers: what actions to run when dependencies are satisfied
- Continuously monitor the EventBus for matching CloudEvents
- Evaluate dependency expressions and conditions
- Execute one or more triggers with optional payload transformation, retries, and backoff
Example Sensor YAML that waits for an event and triggers a Kubernetes Job:
End-to-end flow (summary)
- An external system or service generates an event.
- The EventSource captures the event and converts it into the CloudEvents format.
- The EventSource publishes the CloudEvent to the EventBus.
- The Sensor, subscribed to the EventBus, receives the CloudEvent and evaluates its dependencies.
- Once the Sensor’s dependencies are satisfied, it executes the configured trigger(s).
Best practices and recommendations
- Use CloudEvents everywhere to keep payloads consistent.
- Choose an EventBus with the durability and throughput you need (JetStream or Kafka for persistence).
- Configure Sensor retry and backoff policies for transient failures.
- Keep EventSources lightweight; push heavy processing into downstream consumers or workflows.
- Monitor EventBus health and retention to avoid data loss or backpressure.