{
  "id": "event-2",
  "title": "Outbound Events: How do I stream graph data changes to Kafka?",
  "description": "Configure event streaming for Knowledge Graph changes. Receive real-time notifications when specific node types are created, updated, or deleted. Filter by node labels and properties.",
  "category": "Outbound Events",
  "tags": [
    "Outbound Events",
    "Kafka",
    "Capture Events",
    "Node Changes",
    "Graph Streaming"
  ],
  "api": "Outbound Events",
  "language": "Json",
  "lastUpdated": "2026-07-15",
  "openApiEndpoints": [
    "/configs/v1/event-sinks"
  ],
  "relatedGuides": [
    "/guides/guide-outbound-events",
    "/guides/guide-sandbox"
  ],
  "commonErrors": [
    {
      "code": "401",
      "message": "UNAUTHENTICATED",
      "solution": "Verify ServiceAccount credentials are valid"
    },
    {
      "code": "400",
      "message": "INVALID_ARGUMENT",
      "solution": "Check event sink configuration format and destination URL"
    }
  ],
  "summary": "This example streams Capture audit events (node upserts and deletes) to Kafka:\n\nEvent types covered:\n- indykite.audit.capture.upsert.node (node created/updated)\n- indykite.audit.capture.delete.node (node deleted)\n- indykite.audit.capture.* (all capture events)\n\nNote: these are Capture audit events, not CDC. CDC (Change Data Capture) events carry the full\nbefore/after state of a change, use the indykite.audit.cdc.* event types, and are enabled per\nevent sink with the top-level include_cdc_events field - see the Outbound Events guide.\n\nFiltering capability:\nFilter events by node label and property values to receive only relevant changes.\n\nExample: Only stream events for Car nodes where manufacturer=\"pontiac\"",
  "usecase": "Scenario: Stream car inventory changes to an external analytics system, but only for Pontiac vehicles.\n\nEvent filter configuration:\n- Event type: indykite.audit.capture.*\n- Label filter: \"Car\"\n- Property filter: manufacturer = \"pontiac\"\n\nEvents generated:\n1. Ingest Car(manufacturer:\"pontiac\") -> Event sent\n2. Ingest Car(manufacturer:\"ford\") -> No event (filtered out)\n3. Update Car(manufacturer:\"pontiac\") -> Event sent\n4. Delete Car(manufacturer:\"pontiac\") -> Event sent\n\nThis enables selective streaming without overwhelming your analytics pipeline.",
  "requirements": "Prerequisites:\n- ServiceAccount credentials: For configuration (Bearer token)\n- AppAgent credentials: For data ingestion (X-IK-ClientKey)\n- Confluent Cloud: API key and Kafka topic ready\n\nTerraform documentation for filter syntax:\nhttps://registry.terraform.io/providers/indykite/indykite/latest/docs/resources/event_sink",
  "steps": "Step 1: Create Kafka Topic\n- Action: Set up topic on Confluent Cloud for receiving car events\n\nStep 2: Create Event Sink Configuration\n- Authentication: ServiceAccount credential (Bearer token)\n- Action: POST Event Sink with filters:\n  - eventType: \"indykite.audit.capture.*\"\n  - nodeLabel: \"Car\"\n  - propertyFilter: {manufacturer: \"pontiac\"}\n- Result: Event Sink active\n\nStep 3: Ingest Initial Car Nodes\n- Authentication: AppAgent credential (X-IK-ClientKey)\n- Action: POST Car nodes including some with manufacturer=\"pontiac\"\n- Result: Events sent for matching nodes only\n\nStep 4: Ingest Additional Matching Nodes\n- Action: POST more Car(manufacturer:\"pontiac\") nodes\n- Result: Each matching node generates an event\n\nStep 5: Verify Event Delivery\n- Check Kafka topic for received events\n- Verify non-matching nodes (other manufacturers) did not generate events",
  "code": [
    {
      "step": "Step 2",
      "description": "Create an EventSink configuration. ",
      "filename": "POST https://eu.api.indykite.com/configs/v1/event-sinks",
      "language": "Json",
      "ingest": {
        "project_id": "your_project_gid",
        "description": "description of eventsink",
        "display_name": "eventsink name",
        "name": "eventsink-name",
        "include_cdc_events": false,
        "providers": {
          "provider-with-kafka": {
            "kafka": {
              "brokers": [
                "your-destination:9092"
              ],
              "disable_tls": false,
              "tls_skip_verify": false,
              "topic": "topic_signal",
              "username": "api_key",
              "password": "api_key_secret"
            }
          }
        },
        "routes": [
          {
            "provider_id": "provider-with-kafka",
            "event_type_key_values_filter": {
              "context_key_value": [
                {
                  "key": "manufacturer",
                  "value": "pontiac"
                },
                {
                  "key": "captureLabel",
                  "value": "Car"
                }
              ],
              "event_type": "indykite.audit.capture.upsert.node"
            },
            "stop_processing": true,
            "display_name": "Configuration Audit Events"
          }
        ]
      }
    },
    {
      "step": "Step 3",
      "description": "Capture the nodes needed for this use case.",
      "filename": "POST https://eu.api.indykite.com/capture/v1/nodes/",
      "ingest": {
        "nodes": [
          {
            "external_id": "alice",
            "is_identity": true,
            "type": "Person",
            "properties": [
              {
                "type": "email",
                "value": "alice@email.com"
              },
              {
                "type": "given_name",
                "value": "Alice"
              },
              {
                "type": "last_name",
                "value": "Smith"
              }
            ]
          },
          {
            "external_id": "knightrider",
            "type": "Person",
            "is_identity": true,
            "properties": [
              {
                "type": "email",
                "value": "knightrider@demo.com"
              },
              {
                "type": "name",
                "value": "Michael Knight"
              }
            ]
          },
          {
            "external_id": "satchmo",
            "type": "Person",
            "is_identity": true,
            "properties": [
              {
                "type": "email",
                "value": "satchmo@demo.com"
              },
              {
                "type": "name",
                "value": "Louis Armstrong"
              }
            ]
          },
          {
            "external_id": "karel",
            "type": "Person",
            "is_identity": true,
            "properties": [
              {
                "type": "email",
                "value": "karel@demo.com"
              },
              {
                "type": "name",
                "value": "Karel Plihal"
              }
            ]
          },
          {
            "external_id": "kitt",
            "type": "Car",
            "is_identity": false,
            "properties": [
              {
                "type": "manufacturer",
                "value": "pontiac"
              },
              {
                "type": "model",
                "value": "Firebird"
              }
            ]
          },
          {
            "external_id": "cadillacv16",
            "type": "Car",
            "is_identity": false,
            "properties": [
              {
                "type": "manufacturer",
                "value": "Cadillac"
              },
              {
                "type": "model",
                "value": "V-16"
              }
            ]
          },
          {
            "external_id": "harmonika",
            "type": "Bus",
            "is_identity": false,
            "properties": [
              {
                "type": "manufacturer",
                "value": "Ikarus"
              },
              {
                "type": "model",
                "value": "280"
              }
            ]
          },
          {
            "external_id": "listek",
            "type": "Ticket",
            "is_identity": false
          },
          {
            "external_id": "airbook-xyz",
            "type": "Laptop",
            "is_identity": false
          }
        ]
      }
    },
    {
      "step": "Step 4",
      "description": "Capture the nodes needed for this use case.",
      "filename": "POST https://eu.api.indykite.com/capture/v1/nodes/",
      "ingest": {
        "nodes": [
          {
            "external_id": "kitten",
            "type": "Car",
            "is_identity": false,
            "properties": [
              {
                "type": "manufacturer",
                "value": "pontiac"
              },
              {
                "type": "model",
                "value": "Bonneville"
              }
            ]
          },
          {
            "external_id": "kitty",
            "type": "Car",
            "is_identity": false,
            "properties": [
              {
                "type": "manufacturer",
                "value": "pontiac"
              },
              {
                "type": "model",
                "value": "Catalina"
              }
            ]
          }
        ]
      }
    }
  ],
  "links": {
    "html": "/resources/event-2",
    "markdown": "/resources/event-2.md",
    "openApi": "https://openapi.indykite.com/"
  }
}