{
  "packaging_version": "2",
  "type": "kafka",
  "name": "Kafka",
  "version": "1.0.0",
  "min_app_version": "0.1.0",
  "description": "Consume messages from Kafka topics to detect active assets",
  "category": "Message Streaming",
  "icon": "radio",
  "supported_modes": ["batch", "realtime"],
  "implementation": {
    "type": "container",
    "image": "ghcr.io/silentpulse/connector-kafka:1.0.0",
    "resources": { "cpu": "100m", "memory": "128Mi" },
    "scaling": { "min_replicas": 1, "max_replicas": 8, "scaling_key": "partitions" },
    "health_check": { "command": ["/connector", "--healthcheck"], "interval": 30, "timeout": 5 },
    "build": { "repository": "https://github.com/silentpulse/connectors" }
  },
  "fields": [
    { "name": "brokers", "type": "text", "required": true, "group": "connection", "label": "Brokers", "description": "Comma-separated list of Kafka brokers" },
    { "name": "username", "type": "text", "required": false, "group": "connection", "label": "Username" },
    { "name": "password", "type": "password", "required": false, "group": "connection", "label": "Password" },
    { "name": "use_tls", "type": "boolean", "required": false, "group": "connection", "label": "Use TLS" },
    { "name": "topic", "type": "text", "required": true, "group": "query", "label": "Topic", "description": "Kafka topic to consume from" },
    { "name": "consumer_group", "type": "text", "required": false, "group": "query", "label": "Consumer Group", "default": "silentpulse" },
    { "name": "hostname_source", "type": "select", "required": false, "group": "query", "label": "Hostname Source", "default": "body", "options": ["body", "key"], "description": "Extract hostname from message body (JSON field) or key (raw bytes)" },
    { "name": "hostname_field", "type": "text", "required": true, "group": "query", "label": "Hostname Field", "default": "hostname", "description": "JSON field path for hostname extraction (used when source is body)" }
  ],
  "maintainer": {
    "name": "SilentPulse",
    "email": "support@silentpulse.io",
    "url": "https://silentpulse.io"
  },
  "repository": "https://github.com/silentpulse/connectors",
  "tags": ["streaming", "kafka", "message-queue", "apache"],
  "readme": "# Kafka Connector\n\nConsume messages from Apache Kafka topics to detect active assets based on security event telemetry.\n\n## Requirements\n\n- Apache Kafka 2.0 or later\n- Network access from SilentPulse to Kafka brokers\n- SASL credentials (if authentication is enabled)\n\n## Configuration\n\nProvide the broker list and topic name. The connector will consume messages and extract hostnames from the configured field.\n\n## Scaling\n\nThe connector supports horizontal scaling based on Kafka partition count. Set `max_replicas` to match your partition count for optimal throughput.",
  "notes": {
    "requirements": "Apache Kafka 2.0+ with network access from SilentPulse cluster",
    "configuration": "Provide broker list and topic. SASL/TLS are optional.",
    "limitations": "Consumer group must be unique per SilentPulse instance. Max message size 1MB."
  }
}
