Table of Contents

Interface IKNetConnector

Namespace
MASES.KNet.Connect
Assembly
MASES.KNet.dll

Specific implementation of IConnector to support KNet Connect SDK

public interface IKNetConnector : IKNetCommon, IKNetConnectLogging, IConnector, IVersion
Inherited Members

Properties

ConnectorName

The unique name of the connector

string ConnectorName { get; }

Property Value

string

Properties

The properties retrieved from MASES.KNet.Connect.KNetConnector.StartInternal()

IReadOnlyDictionary<string, string> Properties { get; }

Property Value

IReadOnlyDictionary<string, string>

TaskClassType

The Type of task to be allocated, it shall inherits from KNetTask

Type TaskClassType { get; }

Property Value

Type

Methods

AllocateTask(long)

Allocates a task object based on KNetTask

object AllocateTask(long taskId)

Parameters

taskId long

The unique id generated from JAva side

Returns

object

The local .NET object

Start(IReadOnlyDictionary<string, string>)

Implement the method to execute the start action

void Start(IReadOnlyDictionary<string, string> props)

Parameters

props IReadOnlyDictionary<string, string>

The set of properties returned from Apache Kafka Connect framework: the IReadOnlyDictionary<TKey, TValue> contains the same info from configuration file.

TaskConfigs(int, int, IDictionary<string, string>)

Invoked during allocation of tasks from Apache Kafka Connect

bool TaskConfigs(int currentTask, int maxTasks, IDictionary<string, string> config)

Parameters

currentTask int

The actual task index

maxTasks int

Max tasks as defined from Apache Kafka Connect framework

config IDictionary<string, string>

The IDictionary<TKey, TValue> to be filled in with properties for the task: the same will be received from Start(IReadOnlyDictionary<string, string>)

Returns

bool

true to avoid any further invocation of the method, otherwise false.

Remarks

If the connector needs a single task and maxTasks is higher than 1, returning true immediately only one configuration is returned to Apache Kafka Connect framework. In other word it is possible to stop the configuration requests at any time; only the first one is reported in any case since at least one shall be available. To configure all maxTasks return always false.