Kafka Connect Java Client

Java client library for Apache Kafka Connect REST Interface

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

io.streamthoughts
Идентификатор

Идентификатор

kafka-connect-client
Последняя версия

Последняя версия

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Kafka Connect Java Client
Java client library for Apache Kafka Connect REST Interface
Ссылка на сайт

Ссылка на сайт

https://github.com/streamthoughts/kafka-connect-client
Организация-разработчик

Организация-разработчик

streamthoughts
Система контроля версий

Система контроля версий

https://github.com/streamthoughts/kafka-connect-client

Скачать kafka-connect-client

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.streamthoughts/kafka-connect-client/ -->
<dependency>
    <groupId>io.streamthoughts</groupId>
    <artifactId>kafka-connect-client</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.streamthoughts/kafka-connect-client/
implementation 'io.streamthoughts:kafka-connect-client:0.1.0'
// https://jarcasting.com/artifacts/io.streamthoughts/kafka-connect-client/
implementation ("io.streamthoughts:kafka-connect-client:0.1.0")
'io.streamthoughts:kafka-connect-client:jar:0.1.0'
<dependency org="io.streamthoughts" name="kafka-connect-client" rev="0.1.0">
  <artifact name="kafka-connect-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.streamthoughts', module='kafka-connect-client', version='0.1.0')
)
libraryDependencies += "io.streamthoughts" % "kafka-connect-client" % "0.1.0"
[io.streamthoughts/kafka-connect-client "0.1.0"]

Зависимости

compile (9)

Идентификатор библиотеки Тип Версия
com.squareup.okhttp3 : okhttp jar 4.9.0
com.squareup.okhttp3 : logging-interceptor jar 4.9.0
javax.annotation : javax.annotation-api jar 1.3.2
com.google.code.gson : gson jar 2.8.6
io.gsonfire : gson-fire jar 1.8.5
com.google.code.findbugs : jsr305 jar 3.0.2
org.slf4j : slf4j-api jar 1.7.28
io.swagger : swagger-annotations jar 1.6.2
org.mock-server : mockserver-junit-jupiter jar 5.11.2

test (8)

Идентификатор библиотеки Тип Версия
org.hamcrest : hamcrest-junit jar 2.0.0.0
ch.qos.logback : logback-classic jar 1.2.3
org.junit.platform : junit-platform-launcher jar 1.7.1
org.junit.jupiter : junit-jupiter-engine jar 5.8.0-M1
org.junit.vintage : junit-vintage-engine jar 5.8.0-M1
org.testcontainers : kafka jar 1.15.2
org.testcontainers : junit-jupiter jar 1.15.2
org.mockito : mockito-all jar 1.10.19

Модули Проекта

Данный проект не имеет модулей.

Java client library for Kafka Connect REST Interface

🚀 Quickstart

This project is available in Maven Central. You can add Kafka Connect Client to the dependency of the pom.xml of your project.

<dependency>
  <groupId>io.streamthoughts</groupId>
  <artifactId>kafka-connect-client</artifactId>
  <version>0.1.0</version>
</dependency>

Build the project

Prerequisites for building the project:

  • Git

  • Java 11

  • Docker (for running integration-tests)

$ git clone https://github.com/streamthoughts/kafka-connect-client.git
$ cd kafka-connect-client
./mvnw -B clean verify

Code Examples

Listing all active connectors
ApiClient client = Config.defaultClient();
Configuration.setDefaultApiClient(client);

ConnectApi api = new ConnectApi();

final List<String> connectors = api.listConnectors();
Deploying a new connector
ApiClient apiClient = Config.defaultClient();
Configuration.setDefaultApiClient(apiClient);

KafkaConnectRestClient client = new KafkaConnectRestClient();

CompletableFuture<ConnectorInfo> future = client
  .updateOrCreateConnectorConfig(
      "filestream-source",
      ConnectorConfig.builder()
          .withConnectorClass("FileStreamSource")
          .withTasksMax(1)
          .withTopic("connect-test")
          .withConnectorProp("file", "/tmp/test.txt")
  );
Listing all failed Tasks
ApiClient apiClient = Config.defaultClient();
Configuration.setDefaultApiClient(apiClient);

KafkaConnectRestClient client = new KafkaConnectRestClient();
List<TaskState> failedTasks = client.listTasksWithState(state -> state.equals(State.FAILED)).get();

🙏 Show your support

Do you think this project can help you manage Kafka Connect? Please 🌟 this repository to support us!

💡 Contributions

Any feedback, bug reports and PRs are greatly appreciated!

Licence

Copyright 2021 StreamThoughts.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License

io.streamthoughts

StreamThoughts

The leading French start-up in event streaming.

Версии библиотеки

Версия
0.1.0