Apache Kafka Connect deployment and operations

Kafka Connect moves data between databases, object storage, SaaS tools and Kafka topics. This page covers the decisions, build sequence, effort drivers and checks for running it in distributed mode on infrastructure you control.

On this page

When Kafka Connect deployment needs a deliberate plan

When database, object storage and SaaS integrations move past one-off scripts and point-to-point jobs, Kafka Connect needs to run as a shared, supervised service with defined owners, upgrade windows and access controls. Apache Kafka Connect is part of the Apache Kafka project, which is released under the Apache License 2.0, so the software itself carries no license fee. Since Kafka 4.0, brokers, Kafka Connect and tools require Java 17, and the supported releases listed on the Kafka downloads page are 4.3.1, 4.2.2 and 4.1.2. Confirm which of these your Connect workers will run before you choose plugin versions.

Connect is harder to run than it looks for three reasons. First, connector plugins are separate artifacts with their own versions and dependencies, so a worker upgrade can break a connector that was working the day before. Second, the workers hold the credentials for every source and sink, which makes the worker configuration and its secret handling part of your data security boundary, not just an application detail. Third, failures often show up as stalled offsets rather than clear errors: a connector reports RUNNING while a source has quietly stopped delivering records. Plan monitoring on offset progress and lag, not only on task state.

Decide early who owns each connector, who approves plugin changes, how credentials are rotated and where worker logs and task status are reviewed. Ask any implementation partner to show how they would test a connector upgrade against a copy of your data flow and how they would detect a silent stall. Broker sizing and cluster design are covered in the implementation plan, so the questions here focus on the Connect layer that sits on top of that cluster.

Which Kafka Connect parts you size, secure and monitor

A distributed Kafka Connect deployment is a small set of moving parts that depend on each other. Workers run the connectors, Kafka holds the state, plugins supply the code and the REST API controls the lifecycle. Each part needs a named owner before the first connector goes live.

Distributed workers

Workers are the JVM processes that run connector and task instances. Every worker in a group must share the same group.id and point at the same Kafka cluster, and tasks are rebalanced across the group as workers join or leave. Misconfigured workers with different group settings form separate clusters that quietly split your connectors. Size heap and task counts against the connectors you plan to run, and own the worker JVM, its restart behavior and its Java 17 runtime.

Internal config, offset and status topics

Connect stores connector configurations, committed source offsets and task status in three internal Kafka topics, named by the config.storage.topic, offset.storage.topic and status.storage.topic settings. Losing or corrupting these topics means connectors restart from the wrong position or lose their definitions. Give them a replication factor and access rules that match your other critical topics, and confirm that cleanup settings do not remove state you still need.

Connector and task instances

A connector is the logical job, such as a database source or an object storage sink, and it splits its work into tasks that run on workers. The number of tasks, the converter choice and the error policy determine throughput and how failures spread. A connector that runs many tasks on one worker can starve others on the same node. Assign each connector an owner, a documented task count and a restart policy.

Plugin path and connector JARs

Connector code is loaded from directories listed in plugin.path, and every worker in the group needs the same versions installed. A missing or mismatched JAR shows up as a connector that fails to start on only some workers. Keep plugin artifacts in version control, deploy them identically to every node, and record which connector versions were tested against which Kafka release before any upgrade.

REST API as the control point

The Connect REST API is where connectors are created, paused, restarted and reconfigured. Anyone who can reach it can change what data moves and where it goes, so it is a privileged surface. Bind it to an internal interface, require TLS and authentication, and log every change. Treat connector configuration as code, and confirm the access model with your security team before exposing the port beyond the platform network.

Replication and access for internal topics

The internal Connect topics live inside the Kafka cluster, so they inherit that cluster's replication, ACL and quota planning. Connect's principal needs read and write access to these topics and to every data topic its connectors touch. Missing ACLs on an internal topic can stop workers from starting, and an overly broad grant lets one connector read another's data. Include these topics in your authorization review. MirrorMaker 2 is also built on Kafka Connect, but its replication design is covered separately.

Kafka Connect deployment choices and their operating cost

This table compares the main Kafka Connect deployment decisions: shared or separate clusters, worker placement, plugin packaging and self-run connectors versus a managed integration tool. Read each row for when the option fits and what it shifts onto upgrades, isolation, credential scope and on-call work.

DecisionOptionTrade-offWhen it fits
Cluster scopeOne shared distributed Connect clusterLowest upkeep and one upgrade path, but a bad connector or plugin can affect other teams' pipelines and credentials are often broaderSmall platform team, few domains, uniform security rules
Cluster scopeSeparate Connect clusters per domainStronger isolation and narrower credential scope, but more upgrades, more monitoring and more on-call rotationsRegulated domains with separate data owners or distinct access rules
Worker placementWorkers co-located with brokersFewer hosts to run, but broker and worker resource contention and shared failure domainsTest or low-volume environments where host count is the constraint
Worker placementWorkers on separate hosts or containersIndependent scaling and restarts, with more infrastructure to patch and network paths to secureProduction pipelines with sustained throughput or strict change windows
Plugin installationSelf-managed plugin directories on hostsQuick to change, but drift between workers is easy and rollbacks depend on manual stepsTeams with strong configuration management and few plugins
Plugin installationPlugins baked into versioned imagesRepeatable and auditable builds, but every plugin change requires an image rebuild and redeployEnvironments that already deploy services from immutable images
Integration modelSelf-run sink and source connectorsFull control over versions, error handling and secrets, with ongoing ownership of patches, plugin compatibility and alertingTeams with Kafka operations skills and steady connector demand
Integration modelManaged integration toolLess connector operations work, but data flows through a third-party service and the connector catalog and controls are set by that vendorTeams that accept vendor data handling terms and need few custom connectors

How to build a distributed Kafka Connect cluster step by step

This sequence takes a team from a verified Java and Kafka release to a distributed Connect cluster with shared internal topics, pinned plugins, working source and sink connectors, and workers that rebalance when capacity changes. Each step closes with a check so problems surface before production data moves.

  1. Confirm Java 17 and the Kafka release

    Confirm that every host that will run a Connect worker has Java 17 installed, since Kafka 4.0 and later require it for Kafka Connect. Agree the Kafka release with the broker team, choosing from the releases listed as supported on the downloads page, and confirm that the Connect workers use the same release family as the brokers or a version the brokers support. Check the Java version on each worker host with java -version and record the Kafka version in your change record. The step is done when every host reports Java 17 and the release is written down and approved.

  2. Prepare the internal topics with agreed replication

    Create the three internal topics that a distributed Connect cluster uses for configuration, offsets and status, named through the config.storage.topic, offset.storage.topic and status.storage.topic keys. Set replication factors and partition counts with the broker team so that they match the cluster's replication and min.insync.replicas settings, and keep the config topic at a single partition as Kafka documentation recommends. Confirm the topics exist with kafka-topics.sh --describe and that their replication factor matches the agreed value. The step is done when all three topics are listed with the expected settings.

  3. Write the worker properties file

    Create a worker properties file that sets group.id, bootstrap.servers, the key and value converters, the internal topic names and replication settings, the plugin.path directory, and the REST listener through listeners. Use the same group.id on every worker in the cluster and a different one for any separate Connect cluster. Keep the file under version control and apply the same file to each host, changing only the advertised host name. The step is done when a dry start of one worker parses the file and reports no configuration errors in its logs.

  4. Install connector plugins from pinned versions

    Install the connector plugins your use cases need into the directory named by plugin.path, using exact versions recorded in your build or artifact repository rather than whatever is latest. Include the dependencies each connector requires and verify that their licenses and sources are approved by your organization. Restart the worker and call the REST API endpoint that lists installed connector plugins to confirm each plugin class appears. The step is done when every planned plugin is listed and its version matches the pinned record.

  5. Start the first worker and confirm group membership

    Start one worker in distributed mode and watch its logs until it finishes creating or validating the internal topics and joins the group. Query the REST API root and the worker listing endpoint to confirm the worker is registered with the expected group. Confirm that the REST listener is reachable only from the networks you intended, since the API has no authorization by default and must be protected in later steps. The step is done when the REST API returns the worker with the correct version and the internal topics show the expected offsets.

  6. Create a low-risk source connector

    Create a source connector that reads from a non-production table, a test file location or a sandbox SaaS account, using a POST to the connectors endpoint with a JSON body that names the connector class, task count and connection settings. Store credentials through your secret management approach and avoid placing them in the request body where they would be visible in logs. Check the connector status endpoint until both the connector and its tasks report RUNNING, then insert a test record at the source and confirm it appears on the target topic. The step is done when the test record is visible and the connector shows no failed tasks.

  7. Create a low-risk sink connector

    Create a sink connector that reads from the test topic produced in the previous step and writes to a non-production destination such as a test database schema or an object storage bucket reserved for testing. Configure the error handling settings you intend to use in production, including the dead letter queue topic and error tolerance, so that they are proven before real traffic arrives. Verify the connector and tasks reach RUNNING and that a test message arrives at the destination in the expected format. The step is done when the test record lands at the sink and any deliberately malformed test message is routed to the dead letter topic as configured.

  8. Add workers and confirm rebalancing

    Start additional workers with the same worker properties file and group ID, then confirm through the worker listing endpoint that each new worker joins the group. Watch the connector and task assignments in the status endpoint and confirm that tasks redistribute across workers without losing records. Stop one worker deliberately in a test window and confirm that its tasks move to the remaining workers. The step is done when the cluster lists all expected workers, tasks are spread across them, and the test records keep flowing through both connectors during and after the rebalance.

Choosing connectors for databases, object storage and SaaS

Database connectors fall into two broad approaches. Change data capture reads the database's transaction or change log and streams row-level changes as they happen. Query-based polling runs a SELECT on a schedule against a timestamp or incrementing column and publishes the results. Capture is usually lower latency and can see deletes, while polling is simpler to set up but misses deletes and can miss updates when the watermark column is not maintained reliably. Capture also requires access to the database's log, which is a privileged setup step that the database team must approve.

  • Database-side log access: Capture connectors need replication privileges, a log retention setting long enough to cover connector downtime, and sometimes a dedicated replication slot or publication. Confirm these with the database owner before the connector is chosen.
  • Impact on the source: Polling adds read load on each interval and can hold locks or scan large tables if indexes are missing. Capture adds load on the log and can make log growth a risk if the connector stops reading.
  • Schema changes: Check how the connector handles added or renamed columns and type changes, and whether it emits schema history that consumers can read.
  • Delivery guarantees: Confirm whether the connector provides exactly-once or at-least-once delivery into Kafka, and what downstream deduplication is needed.

Before selecting a database connector, confirm with the maintainer the supported Kafka and Connect versions, the license, the delivery semantics and whether the connector is community or vendor maintained.

What drives Kafka Connect effort and cost

This table lists the main drivers of Kafka Connect build and run effort, how each one raises the workload, and what keeps it contained. Read it to decide which drivers apply to your estate and which costs are one-time versus recurring before you request a fixed-scope quote.

DriverWhy it raises effort or costWhat keeps it down
Number of source and sink systemsEach database, object store or SaaS API needs its own connector configuration, tuning, offset checks and failure runbook.Limit the first release to systems with a clear business owner and use standard, supported connectors where they exist.
Credentials and identity systemsEach connector may hold a service account, secret and rotation schedule, and each identity source adds an access review and break-glass path.Use one secrets store, short-lived credentials where the connector supports them, and a documented rotation procedure per system.
Data volume and throughput per connectorHigh-volume topics need more tasks, larger worker heaps, tuned batch sizes and capacity tests, and lag alerts that page someone.Measure throughput in a test environment before sizing, and split high-volume connectors onto dedicated worker groups.
Number of environmentsDev, test, staging and production each need separate topics, credentials, worker groups and configuration drift checks.Template connector configuration once and generate each environment from the same source, with environment values kept outside the template.
Custom or unsupported connectorsSelf-written or community connectors need build pipelines, plugin packaging, compatibility checks against each Kafka release, and their own defect triage.Prefer standard connectors, confirm their licence and maintenance status first, and reserve custom code for gaps with a named owner.
Transforms and schema handlingSingle message transforms, serializers and schema registry rules change message contracts, so each change needs compatibility testing with downstream consumers.Keep transforms simple, document the schema contract per topic and test schema evolution before each connector change.
Error handling and dead letter routingChoosing tolerance levels, dead letter topics and retry rules requires design, test cases for bad records and an owner who reviews failed records.Use one error-handling pattern across connectors and set alerts on dead letter volume, not only on task failures.
Compliance evidence requirementsAssessors may ask for access logs, change records, encryption settings for each listener and REST API controls, which adds collection and documentation work.Generate configuration and access evidence from the same templates and keep change records in the same repository as the connector definitions.

How Connect workers move data between sources, Kafka and sinks

The flow starts with source systems such as databases and SaaS applications, which source connectors read from. Workers run the connector tasks and write records into Kafka topics, while Connect keeps its own configuration, offset and status state in three internal topics. Sink connectors then read those topics and write to object storage, databases or SaaS targets. Administrators reach workers only through the REST API, so that API and the credential store sit inside a trust boundary. The Kafka cluster is where ACLs apply to every Connect principal, so check those ACLs and the REST API access controls together.

Data and state paths between source systems, Connect workers, Kafka and sinks.

Kafka Connect error handling that stops bad records without stopping pipelines

The core decision in Kafka Connect error handling is separating transient failures from bad records. Transient failures, such as a database that is briefly unreachable, a object store returning throttling responses, or a SaaS API timing out, should be absorbed by retries and should not reach a dead letter queue. Bad records, such as a payload that fails schema conversion or violates a target constraint, will fail every time they are retried, so they need to be isolated while the rest of the task keeps moving. Before writing runbooks, confirm the exact error handling configuration keys, their defaults and their behavior for sink and source connectors against the Kafka 4.3 Connect documentation, since these settings are what your operators will review and change.

The settings a Connect operator reviews fall into three groups: retry and tolerance behavior, dead letter queue routing and failed record logging. Retry settings decide how long a task keeps trying before it fails. Tolerance settings decide whether a bad record stops the task or is skipped. For sink connectors, a dead letter queue topic can hold records that could not be written, and the configuration should name that topic explicitly so quarantined records are not confused with healthy data. Logging of failed records should be enabled so every skipped record leaves a trace with its topic, partition and offset. Treat any tolerance setting that discards records without a dead letter queue or log entry as a data loss risk, and make that combination an explicit exception in your change review.

Silent data loss usually comes from tolerance settings that were relaxed during an incident and never restored, or from source connectors whose offsets advance without the downstream write being confirmed. Alert on consumer lag and on stalled offsets for each connector, not only on process health, because a connector can be running while making no progress. Alert on task state changes to FAILED through the Connect REST API and on the growth rate of the dead letter queue topic. Decide in advance who owns reprocessing: the platform team usually fixes connector configuration and restarts tasks, while the data owner of the source system decides whether quarantined records are corrected and replayed, dropped or handled manually. Write that split into the runbook with named roles, and rehearse one replay of a sample quarantined batch before go-live.

Securing the Kafka Connect REST API and worker credentials

The Kafka Connect REST API and worker configuration decide who can create, change and run connectors, and which credentials those connectors carry. The six controls below cover the management surface, the secrets handling and the audit trail. Hardening of TLS on every listener and StandardAuthorizer deny-by-default design is covered in the security hardening page, and SASL and OIDC choices in the identity page.

Restrict the REST API to a management network

Kafka Connect exposes its REST API on a configured listener, and anyone who can reach it can list, create, pause and delete connectors. Bind the listener to a management network or place it behind a TLS-terminating reverse proxy that only your operations hosts can reach. Confirm that the worker's REST listener is not exposed on a public or application subnet, and check the firewall rules for every worker host, not only the first one. Document which hosts are allowed to call the API.

Authenticate every administrative call

Treat every REST call as privileged, because a single request can redirect a sink connector to a new destination or start a source connector that reads sensitive tables. Enable authentication on the REST path, typically through a proxy or a filter that validates the caller before the request reaches the worker. Confirm which identities may call the API, whether service accounts are separate from people, and how credentials are rotated when someone leaves the team.

Limit who creates connectors and plugin paths

Connector creation and the worker's plugin path setting both change what code runs inside the Connect process. Restrict connector create and update rights to a small group, and keep plugin.path under change control so that only approved connector archives can be loaded. Review which plugins are present on each worker, because an unexpected plugin directory can add code that the connector review never examined. Ask your vendor or internal team to confirm how plugin directories are read at startup.

Keep credentials out of connector JSON

Connector configurations often hold database passwords, cloud access keys and SaaS tokens. Writing these values in plain text into connector JSON means they are visible to anyone who can read the REST API output and to anyone who can read the configuration files in source control. Use a configuration provider or secrets manager so the connector stores a reference, and the worker resolves the value at runtime. Confirm which provider your Connect version supports, and confirm that the secret values are not echoed in logs.

Scope each connector's Kafka principal

Each source and sink connector should authenticate to the brokers as its own principal with ACLs limited to the topics, consumer groups and Connect internal topics it needs. A sink that writes only to one topic should not hold read access to the rest of the cluster. Keep the worker's internal topics separate from application topics so that a misconfigured connector cannot modify them. The ACL design itself follows the StandardAuthorizer model covered in the hardening page.

Record who changed which connector

A connector change can silently alter where regulated data goes, so the change history matters as much as the current state. Capture REST calls and the identity behind each one in your access logs, and store connector configuration in version control with reviewed changes. Compare the live configuration against the stored version on a schedule to find drift. Ask your team to confirm how long these logs are retained and who can read them, since they may contain sensitive connector metadata.

How to test Kafka Connect scaling and failure before go-live

Before go-live, prove that the Connect cluster behaves correctly under change and failure rather than assuming it will. Start with a scaling test: add a distributed worker with the same group.id and plugin path as the existing workers, confirm it joins the worker group, and watch connector tasks rebalance onto it. Then remove a worker gracefully and confirm its tasks move to the survivors. For each step, check that source connectors resume from their stored offsets and that sink connectors do not reprocess or skip records beyond what your delivery guarantees allow. Run the same steps with a sink connector consuming a known record set so you can count the results at the destination.

Next, test failure under load. Kill a worker process while a source and a sink connector are actively moving data, then confirm the surviving workers take over its tasks and the pipeline catches up without manual intervention. Measure how long the group takes to rebalance on your own hardware and network, and record the value so you can set expectations with the business. Rotate one credential, such as a database password or an object storage key, by updating the external secret and restarting the affected connector through the REST API, confirming the connector recovers without changing its configuration in version control. Restart a connector and a single task separately, since the REST API handles those two calls differently. Finally, send malformed records (wrong types, missing fields, oversized payloads) and confirm they reach the dead letter queue or the error path you configured, with the error context attached, while valid records keep flowing. Confirm the error tolerance and dead letter settings against the Connect documentation for your release, because behavior differs between connector plugins.

After go-live, monitor connector and task state through the REST API status endpoints, alerting on any task in a FAILED state and on connectors stuck in PAUSED or UNASSIGNED. Track consumer lag for sink connectors, since lag growth is often the first sign of a downstream outage. For source connectors, watch offset progress so a stalled source is caught before the source system's own retention window passes. Monitor worker group membership so a missing worker is noticed before the remaining workers absorb all the load. Keep REST API access logs and review them for failed authentication attempts and unexpected callers, since the API can change connector configuration. Document and back up connector configurations in version control, the exact plugin versions and checksums, the settings of the internal topics (config.storage.topic, offset.storage.topic, status.storage.topic), and a runbook for recovering a stalled connector, reviewed after every upgrade.

Kafka Connect deployment questions buyers ask before hiring help

How much effort does a Kafka Connect deployment take?

Effort depends mostly on how many source and sink systems the workers must reach, how many of those connectors already exist as maintained plugins, and how much of the security and operations setup is new to your team. A single distributed Connect cluster with two or three well-known connectors is a much smaller job than a shared platform serving many database, object storage and SaaS integrations with custom error handling. Ask any provider to break the effort into worker sizing and cluster build, connector selection and configuration, secrets and TLS, REST API access control, monitoring, and runbooks for restarts and failed tasks. Each item should carry its own estimate so you can see which one drives the total.

Can our own team build Kafka Connect without a partner?

Yes, if your team already runs Kafka and has engineers who can operate Java services, manage TLS certificates and secrets, and write deployment automation. Kafka Connect runs in distributed mode as a separate set of worker processes, so the skills needed are close to those for running any stateful Java service. The harder parts are usually the ones outside Connect: agreeing on connector ownership, getting source system credentials issued with least privilege, and deciding how failures are reported to the people who must act on them. A partner adds value when those decisions are new, when the timeline is short, or when you want a documented, tested baseline your own staff can take over. Confirm your team's Kafka and Java experience before deciding.

How long does Kafka Connect work take, and what changes it?

The duration depends on scope and connector count more than on the Connect runtime itself. Standing up the workers is usually the quickest step. Each connector adds its own work: confirming the plugin is maintained, testing the source or sink configuration against a non-production system, deciding how schema changes are handled, and proving that restarts do not duplicate or lose records. Access requests, change windows and security review also add elapsed time that the engineering work does not control. Ask for a schedule that lists connectors as separate milestones, names the client-side dependencies, and states what is excluded. Any timeline should be tied to the written scope, not to a general estimate.

What does the work need from our team?

Plan for time from several owners before the engineering starts. Source system owners, typically database administrators and SaaS administrators, must provide read or write accounts scoped to the tables, buckets or objects each connector needs. Identity owners must agree how the Connect REST API and the workers authenticate, and whether service accounts or client certificates are used. Network owners must open the paths from the Connect workers to brokers, databases and external APIs, and confirm any egress rules. Platform or security owners must approve where secrets live and who may change connector configurations. Ask the provider to list each of these as a named client dependency with an owner and a date, so delays are visible early.

How do Kafka upgrades affect connectors and plugins?

Upgrading Kafka does not automatically upgrade your connectors, and each connector plugin must be checked against the new Connect release. The Kafka upgrade notes state that since Kafka 4.0, brokers, Kafka Connect and tools require Java 17, and clients and Kafka Streams applications require at least Java 11, so plugin runtimes and build settings may need changes first. Kafka's time-based release plan says rolling upgrades are supported from each of the last three releases to the latest version, but that does not certify every third-party connector. Plan a test cluster, run each connector against it, check for deprecated configuration keys, and keep the plugin versions pinned in your deployment records. Confirm the supported upgrade path from the official Kafka upgrade notes before scheduling a change.

What should a fixed-scope Kafka Connect quote list?

A fixed-scope quote should name the deliverables, not just the activities. Expect a list of the Connect cluster to be built, the Kafka release and Java version it targets, the named connectors and the source or sink system each one reads from or writes to, and the error handling rule for each. It should also list the security items: TLS on the Connect REST API and worker listeners, the chosen authentication method, how secrets are stored, and who holds the admin role. Operations items matter too: metrics and alerts, restart and recovery runbooks, and a handover session. Finally, the quote should state exclusions, client dependencies, acceptance tests and what is recurring, such as plugin upgrades or support. Ask for the written scope before any work starts.

How DeployOpen scopes, builds and hands over Kafka Connect

DeployOpen plans, builds and documents Kafka Connect inside your own infrastructure, from the worker layout and connector choices through to the REST API security settings. Each engagement starts from a written scope, so the connectors, workers, error handling and operating runbooks are agreed before any build work begins.

How we scope

  • Inventory every source and sink (databases, object storage, SaaS) and the connectors each one needs.
  • Confirm the target Kafka release and Java 17 runtime for Connect workers before choosing connector versions.
  • Agree in writing which connectors, error handling settings, worker sizing and REST API controls are in the fixed scope.

How we build

  • Deploy distributed-mode workers in your environment with internal topics, replication and group settings planned up front.
  • Configure TLS and SASL on Connect worker listeners and the REST API, then set ACLs for each connector principal.
  • Test each connector against failure cases such as dead-letter routing, task restarts and broker unavailability before go-live.

How we hand over

  • Deliver configuration files, connector definitions and sizing notes stored in your version control system.
  • Provide runbooks for adding workers, scaling tasks, rotating credentials and recovering failed connectors.
  • Walk your platform and security teams through the setup and record the decisions behind each setting.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed before work starts.
  • Ongoing support, connector upgrades and continuous testing are available as a retainer after handover.
  • Ask during scoping which Connect and connector upgrades, and which support hours, a retainer would include.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.