Skip to content
Weik.ioDocs
2026.1
Try Weik.io

This page describes Weik.io 2026.1, and the current release is 2026.2. Read this topic for 2026.2

Event Sources

Weik.io 2026.1

Integrate event producers using Apache Camel Kamelets.

On this page

Event Sources capture events from external systems using Apache Camel Kamelets and publish them as CloudEvents to NATS JetStream.

Configuration format#

Event sources are configured using YAML files:

apiVersion: weik.io/v1alpha1
kind: EventSource
metadata:
  name: file-watch-test
  description: Watch for file changes in a dir
spec:
  type: file-watch
  parameters:
    filePath: "/tmp/eventdatatest"
    events: "CREATE,MODIFY"
  eventType: weikio.file.${header.CamelFileEventType}

Applying configuration#

Use the Weik.io CLI to apply event source configurations:

Terminal
weikio config apply filename.yaml

API endpoints#

  1. GET /eventsources/configurations

    • Returns all event sources
    • Requires “EventSource.Read” policy
  2. GET /eventsources/configurations/{name}

    • Returns a specific event source by name
    • Requires “EventSource.Read” policy

Event source types#

Event sources are based on Apache Camel Kamelets. You can use any source Kamelet from the Apache Camel Kamelet catalog.

File watch source#

apiVersion: weik.io/v1alpha1
kind: EventSource
metadata:
  name: file-watch-test
  description: Watch for file changes in a dir
spec:
  type: file-watch
  parameters:
    filePath: "/tmp/eventdatatest"
    events: "CREATE,MODIFY"
  eventType: weikio.file.${header.CamelFileEventType}

NATS source#

apiVersion: weik.io/v1alpha1
kind: EventSource
metadata:
  name: nats-events
  description: Listen for NATS messages
spec:
  type: nats-source
  parameters:
    servers: "nats://localhost:4222"
    topic: "events.>"
    queueGroup: "event-source-group"

AWS S3 source#

apiVersion: weik.io/v1alpha1
kind: EventSource
metadata:
  name: s3-events
  description: Monitor AWS S3 bucket for changes
spec:
  type: aws-s3-source
  parameters:
    bucketNameOrArn: "my-bucket"
    region: "eu-west-1"
    accessKey: "{{accessKey}}"
    secretKey: "{{secretKey}}"
  variables:
    - accessKey: "{{sys:AWS_ACCESS_KEY}}"
    - secretKey: "{{sys:AWS_SECRET_KEY}}"

Event processing#

When an event source is configured:

  1. A NATS JetStream stream is automatically created

    • Stream name: eventsource-{name}-stream
    • Subject: eventsource.{name}
    • Republish configuration to eventsourceprocessing.{name}
  2. An Integration Flow is created using the specified Kamelet

    • Flow connects the event source to the NATS stream
    • Events are converted to CloudEvents
    • CloudEvents are published to the NATS stream

Integration with other features#

Variables support#

Event sources can use variables in their configurations:

apiVersion: weik.io/v1alpha1
kind: EventSource
metadata:
  name: s3-events
spec:
  type: aws-s3-source
  parameters:
    bucketNameOrArn: "my-bucket"
    accessKey: "{{accessKey}}"
    secretKey: "{{secretKey}}"
  variables:
    - accessKey: "{{sys:AWS_ACCESS_KEY}}"
    - secretKey: "{{sys:AWS_SECRET_KEY}}"

User interface#

Event Sources can be managed through the web interface:

  1. Navigate to Eventing > Event Sources in the sidebar
  2. The interface displays all configured event sources with:
    • Name and description
    • Source type
    • Creation date
    • Detailed view with tabbed interface showing:
      • Parameters configuration
      • Variables
      • CloudEvents generated by the source

Next steps#