Skip to main content

Kafka

Connect your Apache Kafka clusters to enable Alex (Cloud Engineer) and Tony (Database Engineer) to monitor topic health, analyze consumer lag, and optimize streaming performance.

Supported Platforms

PlatformSupport
Self-hosted Kafka2.8+ (KRaft mode), 3.x
Confluent CloudAll tiers

Setup

Select your Kafka platform for specific connection instructions:
For local development or secure internal networks using unauthenticated Kafka (e.g., Confluent Local via Docker), no server-side configuration or user creation is required.
1

Ensure Network Access

Ensure the CloudThinker application can reach your Kafka broker at <broker-name>.<your-domain>:9092.
2

Add Connection in CloudThinker

Navigate to Connections → Kafka in the CloudThinker dashboard and enter your endpoints. No credentials are required for unauthenticated clusters.
{
  "BOOTSTRAP_SERVERS": "<broker-name>.<your-domain>:9092"
}
For clusters with Schema Registry, add the endpoint:
{
  "BOOTSTRAP_SERVERS": "<broker-name>.<your-domain>:9092",
  "SCHEMA_REGISTRY_ENDPOINT": "http://<schema-registry-host>:<port>"
}
Schema Registry is only required if you are actively using it to manage data schemas.

Add Connection in CloudThinker

Back in the CloudThinker App, navigate to Connections → Kafka, add your bootstrap servers and authentication details, and finish. For Confluent Cloud, you can leave optional scope fields empty and add them later.

Agent Capabilities

Once connected, Alex and Tony can:
CapabilityDescription
Consumer Lag MonitoringTrack lag per consumer group, identify slow consumers
Topic Health AnalysisCheck partition distribution, replication factor, under-replicated partitions
Throughput MetricsMonitor bytes in/out, message rates per topic
Broker HealthTrack broker availability, ISR (In-Sync Replicas) status

Example Prompts

@alex check consumer lag for the orders-service group
@alex identify under-replicated partitions
@tony analyze message throughput trends for the events topic
@tony check data retention policies across all topics

Troubleshooting

  • Verify the Kafka cluster is running and accepting connections.
  • Check that the broker port (default 9092) is open and not blocked by firewall.
  • Verify bootstrap servers are correct and reachable from CloudThinker.
When using partial scope onboarding, remove the entire key-value pair for unused scopes. Do not leave empty strings.Correct (Kafka-only, Schema Registry removed entirely):
{
  "BOOTSTRAP_SERVERS": "pkc-xxxxx.<region>.<provider>.confluent.cloud:9092",
  "KAFKA_API_KEY": "<kafka-api-key>",
  "KAFKA_API_SECRET": "<kafka-api-secret>",
  "KAFKA_REST_ENDPOINT": "https://pkc-xxxxx.<region>.<provider>.confluent.cloud:443",
  "KAFKA_CLUSTER_ID": "lkc-xxxxx",
  "KAFKA_ENV_ID": "env-xxxxx"
}
Incorrect (empty string values cause validation errors):
{
  "BOOTSTRAP_SERVERS": "pkc-xxxxx.<region>.<provider>.confluent.cloud:9092",
  "KAFKA_API_KEY": "<kafka-api-key>",
  "KAFKA_API_SECRET": "<kafka-api-secret>",
  "KAFKA_REST_ENDPOINT": "https://pkc-xxxxx.<region>.<provider>.confluent.cloud:443",
  "KAFKA_CLUSTER_ID": "lkc-xxxxx",
  "KAFKA_ENV_ID": "env-xxxxx",
  "SCHEMA_REGISTRY_ENDPOINT": "",
  "SCHEMA_REGISTRY_API_KEY": ""
}

Security Best Practices

  • Network restrictions - Restrict Kafka access to CloudThinker IPs via security groups or firewalls.
  • Dedicated credentials - Create a dedicated user/API key for CloudThinker with minimal read-only permissions.
  • Regular credential rotation - Rotate API keys and passwords periodically.

Confluent Cloud Security Notes

  • Use least-privilege API keys per scope.
  • Store API secrets in a secure secret manager.
  • Rotate keys regularly.
  • For production, prefer Service Account keys over personal keys.
CloudThinker supports partial scope onboarding. If you only provide Kafka scope fields first, you can still create the connection and add Schema Registry, Flink, Cloud API, or Tableflow credentials later.

Alex Agent

Cloud infrastructure and streaming optimization agent

AWS Connection

Setup instructions for AWS cloud resources