Table of Contents

KNet: Connect SDK

This is only a quick start guide, many other information related to Apache Kafka Connect can be found at the following link


To start a Connect session the user shall use the KNet Connect.

The commands related to Apache Kafka Connect are:

  • ConnectDistributed
  • ConnectStandalone

To go in detail look at and


In this guide we focus on the standalone version. The guide start from the assumption that an assembly was generated: see Template Usage Guide. Put the assembly within a folder (C:\MyConnect), then go within it. As explained in Apache Kafka Connect needs at least one configuration file, in standalone mode it needs two configuration files:

  1. The first file is (or for distributed environments): this file contains configuration information for Apache Kafka Connect;
  2. The second optional file defines the connector to use and its options.

In the config folder the user can found many configuration files. The files named and contain examples for sink and source connectors.

Copy within C:\MyConnect and update it especially on line containing bootstrap.servers, then copy or depending on the connector type. The main options related to KNet Connect SDK are:

  • connector.class=KNetSinkConnector where the value is the connector Java class and must be:
    • KNetSinkConnector for sink connectors
    • KNetSourceConnector for source connectors
  • knet.dotnet.classname=MASES.KNetTemplate.KNetConnect.KNetConnectSink, knetConnectSink where the value is the .NET class name in the form of FullName, AssemblyName

When the C:\MyConnect folder contains all the files it is possible to run Apache Kafka Connect:

knetconnect -s

Exactly Once and Transaction properties for Source Connector

From version 3.3.1 of Apache Kafka Connect it is possible to manage Exactly Once and Transaction in the source connector.

Two new fallback options are available in case the infrastructure is not ready to receive request in .NET side to obtain values related to Exactly Once and Transaction:

  • knet.dotnet.source.exactlyOnceSupport: set to true if .NET Source Connector supports Exactly Once
  • knet.dotnet.source.canDefineTransactionBoundaries: set to true if .NET Source Connector can define Transaction Boundaries


As stated in Apache Kafka Connect Guide the distributed version does not use the connector file definition, instead it shall be managed using the REST interface. The start-up command within C:\MyConnect folder becomes:

knetconnect -d