Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Kafka Connect Concepts

Kafka Connect is the integration layer of the Kafka ecosystem, providing a standardized framework for moving data between Kafka and external systems.


Kafka Connect enables enterprise data integration without writing code. Instead of developing custom producers and consumers for each system, organizations deploy integrations through JSON configuration.

Traditional approach (custom code for each integration):

// Hundreds of lines per integration
KafkaProducer<String, byte[]> producer = new KafkaProducer<>(props);
S3Client s3 = S3Client.builder().region(Region.US_EAST_1).build();
while (true) {
ConsumerRecords<String, byte[]> records = consumer.poll(Duration.ofMillis(100));
// Batching logic
// Parquet conversion
// S3 multipart upload
// Offset management
// Error handling
// Retry logic
// Monitoring
}

Kafka Connect approach (configuration only):

{
"name": "s3-sink",
"config": {
"connector.class": "io.confluent.connect.s3.S3SinkConnector",
"topics": "events",
"s3.bucket.name": "data-lake",
"s3.region": "us-east-1",
"format.class": "io.confluent.connect.s3.format.parquet.ParquetFormat",
"flush.size": "10000"
}
}

Deploy via REST API:

Terminal window
curl -X POST -H "Content-Type: application/json" \
--data @s3-sink.json \
http://connect:8083/connectors
AspectCustom CodeKafka Connect
Time to deployWeeks to monthsHours to days
Skills requiredKafka expertise + target system expertiseConfiguration knowledge
Maintenance burdenFull ownership of codeConnector upgrades only
ConsistencyVaries by developerStandardized across all integrations
RiskUntested code in productionBattle-tested connectors
ScalingCode changes may be neededConfiguration change (tasks.max)

For organizations with dozens of integration requirements, the configuration-driven approach transforms data integration from a development problem into an operations problem—dramatically reducing time-to-value and ongoing maintenance costs.

Connector behavior can be modified at runtime via REST API:

Terminal window
# Update configuration (no restart required for some changes)
curl -X PUT -H "Content-Type: application/json" \
--data '{"connector.class": "...", "flush.size": "50000"}' \
http://connect:8083/connectors/s3-sink/config
# Pause connector
curl -X PUT http://connect:8083/connectors/s3-sink/pause
# Resume connector
curl -X PUT http://connect:8083/connectors/s3-sink/resume
# Check status
curl http://connect:8083/connectors/s3-sink/status

No code deployments. No container rebuilds. No CI/CD pipelines for configuration changes.


Modern enterprises operate dozens to hundreds of data systems: relational databases, NoSQL stores, search engines, cloud storage, data warehouses, SaaS applications, and legacy systems. Without a standardized integration approach, each connection requires custom code.

Point-to-point integrations built without Kafka ConnectPoint-to-point integrations built without Kafka ConnectWithout Kafka ConnectSource SystemsCustom CodeSink SystemsKafkaApplicationLogsRESTAPIsIoTSensorsLog ProducerAPI ProducerIoT ProducerS3 ConsumerCassandra ConsumerS3Cassandra5 systems = 5 custom integrationsEach requires: offset tracking,error handling, retry logic,schema management, monitoring
ProblemImpact
Duplicated effortEvery integration reimplements common patterns
Inconsistent qualityEach integration has different error handling, monitoring
Operational burdenEach integration is a separate system to deploy and monitor
Schema couplingProducers and consumers must coordinate on formats
Scalability challengesEach integration must solve parallelism independently

Kafka Connect provides a standardized framework where connectors handle system-specific logic and the framework handles operational concerns.

The same integrations implemented with Kafka Connect connectorsThe same integrations implemented with Kafka Connect connectorsWith Kafka ConnectSource SystemsKafka ConnectSink SystemsKafkaApplicationLogsRESTAPIsIoTSensorsFilestreamSourceHTTPSourceMQTTSourceS3 SinkCassandraSinkS3CassandraFramework handles:- Offset management- Fault tolerance- Scalability- Monitoring- Configuration
CapabilityDescription
200+ production-grade connectorsDatabase CDC, cloud storage, search engines, messaging systems
Standardized operationsSame deployment, monitoring, and management for all connectors
Distributed modeAutomatic task distribution and fault tolerance
Offset trackingFramework manages position in source/sink systems
Schema integrationAutomatic serialization via Schema Registry
Single Message TransformsLightweight transformations without custom code
Dead letter queuesStandardized error handling
Exactly-once processingSupported for compatible connectors and configurations

The Kafka Connect ecosystem includes connectors for virtually every common data system.

Connector categories in the Kafka Connect ecosystemConnector categories in the Kafka Connect ecosystemKafka Connect EcosystemEvent SourcesCloud Storage SinksDatabase SinksData Warehouse SinksHTTP/REST SourceMQTT SourceFile/Syslog SourceJMS/MQ SourceAmazon SQS SourceAmazon Kinesis SourceAmazon S3Google Cloud StorageAzure Blob StorageHDFSCassandra SinkJDBC SinkElasticsearch SinkOpenSearch SinkSnowflakeBigQueryRedshiftDatabricks
CategoryConnectorsPrimary Use Case
Event SourcesHTTP/REST, MQTT, File/Syslog, JMS/MQStreaming events into Kafka
Cloud Storage SinksS3, GCS, Azure Blob, HDFSData lake ingestion
Database SinksCassandra, JDBC, Elasticsearch, OpenSearch (examples)Persistent storage and search
Data Warehouse SinksSnowflake, BigQuery, Redshift, DatabricksAnalytics pipelines

Kafka Connect is often the most valuable component of a Kafka deployment. Several factors explain this:

Production connectors implement complex logic that is difficult to replicate:

ConnectorComplexity Handled
HTTP SourcePagination, rate limiting, authentication, retry logic
S3 SinkPartitioning, rotation, at-least-once; use idempotent sinks/dedup if required
Cassandra SinkBatching, retry policies, consistency levels, schema mapping
MQTT SourceQoS handling, reconnection, message ordering, topic mapping
AspectWithout ConnectWith Connect
DeploymentDifferent for each integrationSame for all connectors
MonitoringCustom metrics per integrationStandard JMX metrics
ScalingCustom logicAdd workers, increase tasks
Failure handlingCustom implementationDead letter queues, retry policies
ConfigurationCode changesREST API, JSON configuration

Connectors integrate with Schema Registry automatically:

Schema registration and lookup through Schema RegistrySchema registration and lookup through Schema RegistrySource SystemSource ConnectorSchema RegistryKafkaConsumerConnector handles:- Schema detection- Schema registration- Compatibility checkingeventsregister schemaserialized with schema IDfetchlookup schemadeserialize

Source connectors read from external systems and write to Kafka topics.

Source connector flow from external system to Kafka topicSource connector flow from external system to Kafka topicSource Connector FlowExternal SystemSource ConnectorKafka TopicTracks position insource system (offsets)poll for changesproduce records
Source TypeHow It WorksExamples
File-basedWatches for new files or streamsFile Source, Syslog
API-basedPolls REST/GraphQL APIsHTTP Source
Message-basedBridges messaging systemsJMS, MQTT, SQS
Stream-basedConnects streaming platformsKinesis, Event Hubs

Sink connectors read from Kafka topics and write to external systems.

Sink connector flow from Kafka topic to external systemSink connector flow from Kafka topic to external systemSink Connector FlowKafka TopicSink ConnectorExternal SystemCommits offsets aftersuccessful writesconsume recordswrite data
Sink TypeHow It WorksExamples
StorageWrites files in batchesS3, GCS, HDFS
DatabaseUpserts or inserts recordsCassandra, JDBC
SearchIndexes documentsElasticsearch, OpenSearch

Single worker process—suitable for development and simple use cases.

Standalone mode with a single worker and file-based offsetsStandalone mode with a single worker and file-based offsetsStandalone ModeSingle WorkerLocal Offsets(file)Connector 1Connector 2Single point of failureNo horizontal scalingDevelopment/testing onlystore offsets

Multiple worker processes forming a cluster—required for production.

Distributed mode with tasks spread across three workersDistributed mode with tasks spread across three workersDistributed ModeWorker 1Worker 2Worker 3Kafka(offsets, configs, status)Task 1aTask 2aTask 1bTask 3aTask 2bTask 3bOffsets stored in Kafka topicsAutomatic rebalancing on failureHorizontal scaling
AspectStandaloneDistributed
Fault toleranceNoneAutomatic task redistribution
ScalingVertical onlyHorizontal (add workers)
Offset storageLocal fileKafka topics
Use caseDevelopment, simple integrationsProduction

Connectors are divided into tasks for parallelism. Each task processes a subset of the data.

Connector split into three tasks writing to separate topicsConnector split into three tasks writing to separate topicsConnector: file-sourceTask 0(logs/app1)Task 1(logs/app2)Task 2(logs/app3)Log FilesKafkatasks.max=3Each task handlessubset of workapp1-logs topicapp2-logs topicapp3-logs topic
Connector TypeTask Parallelism
File SourceOne task per file or directory
HTTP SourceOne task per endpoint (typically)
S3 SinkTasks share topic partitions
Cassandra SinkTasks share topic partitions

The tasks.max configuration controls maximum parallelism. Actual task count depends on the connector’s ability to parallelize the work.


ScenarioRecommendation
Cloud storage ingestionUse S3/GCS connector—handles partitioning, rotation
Persistent storage to CassandraUse Cassandra Sink—handles batching, consistency levels
Search indexingUse Elasticsearch connector—handles bulk API, backpressure
Legacy messaging bridgeUse JMS/MQ connector—handles protocol translation
ScenarioWhy
Complex business logic in transformationKafka Streams provides full programming model
Non-standard protocols or APIsMay require custom producer/consumer
Real-time with sub-millisecond latencyDirect producer may have less overhead
Highly specialized integrationNo suitable connector exists

The general guidance: prefer Connect when a suitable connector exists. Connectors encode years of production experience and edge case handling.