diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index 6a2033a2..4e037631 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -8,4 +8,4 @@ repositories {
dependencies {
implementation "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
-}
\ No newline at end of file
+}
diff --git a/examples/conf/lightstreamer_conf.xml b/examples/conf/lightstreamer_conf.xml
deleted file mode 100644
index 790c8e00..00000000
--- a/examples/conf/lightstreamer_conf.xml
+++ /dev/null
@@ -1,2812 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- ./lightstreamer_edition_conf.xml
-
-
-
-
-
-
-
- 8080
-
-
-
-
-
-
-
-
-
-
-
-
-
- no
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- no
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Y
-
-
-
-
-
-
-
-
-
- SSL
- TLSv1$
- TLSv1.1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 20000
-
-
-
-
-
- 50000
-
-
- 120000
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- N
-
-
- N
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ./lightstreamer_log_conf.xml
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
- 60000
-
-
-
-
-
- 2000
-
-
-
-
-
-
-
-
- 8888
-
-
-
-
-
-
-
-
- Y
-
-
- 5000
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Y
-
-
-
-
-
-
- SSL
- TLSv1$
- TLSv1.1
-
-
- N
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Y
-
-
- Y
-
-
-
-
-
-
- Y
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- N
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Y
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4000000
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1000
-
-
- 10000
-
-
- 0
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 30
-
-
- 5000
-
-
- 1000
-
-
- 30000
-
-
-
-
- 15000
-
-
- 30000
-
-
-
-
-
-
-
-
-
-
- N
-
-
-
-
-
-
-
-
- ./mpn/hibernate.cfg.xml
-
-
-
-
-
-
-
-
-
-
-
- Y
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- continue_operation
-
-
- ./mpn/apple/apple_notifier_conf.xml
-
-
- ./mpn/google/google_notifier_conf.xml
-
-
-
-
-
-
- ./ErrorPage.html
-
-
-
-
-
- Y
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- N
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/conf/lightstreamer_log_conf.xml b/examples/conf/lightstreamer_log_conf.xml
deleted file mode 100644
index ce84fa5c..00000000
--- a/examples/conf/lightstreamer_log_conf.xml
+++ /dev/null
@@ -1,479 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ../logs/ls.log
-
-
- ../logs/ls.log.%i
- 1
- 5
-
-
-
- 1024KB
-
-
-
- %d{"dd.MMM.yy HH:mm:ss,SSS"} <%5.5(%p%marker)> %m%n
-
-
-
-
- ../logs/Lightstreamer.log
-
-
- ../logs/Lightstreamer.log.%d{yyyy-MM-dd}
-
-
- %d{"dd-MMM-yy HH:mm:ss,SSS"}|%-5.5(%p%marker)|%-19.19c{19}|%-27.27t|%m%n
-
-
-
-
-
-
- %d{"dd.MMM.yy HH:mm:ss,SSS"} <%5.5(%p%marker)> %m%n
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/docker/lightstreamer-kafka-stack.yaml b/examples/docker/lightstreamer-kafka-stack.yaml
index 0b6442fe..829050ee 100644
--- a/examples/docker/lightstreamer-kafka-stack.yaml
+++ b/examples/docker/lightstreamer-kafka-stack.yaml
@@ -8,18 +8,21 @@ services:
# - kafka
ports:
- 8080:8080
- networks:
- - kafka-network
+ # networks:
+ # - kafka-network
volumes:
- type: bind
- source: deploy/connector
- target: /lightstreamer/adapters/kafka-connector
- - type: bind
- source: deploy/conf/lightstreamer_conf.xml
- target: /lightstreamer/conf/lightstreamer_conf.xml
+ source: build/install/lightstreamer-kafka-connector
+ target: /lightstreamer/adapters/lightstreamer-kafka-connector
+ # - type: bind
+ # source: deploy/conf/lightstreamer_conf.xml
+ # target: /lightstreamer/conf/lightstreamer_conf.xml
- type: bind
source: deploy/conf/lightstreamer_log_conf.xml
target: /lightstreamer/conf/lightstreamer_log_conf.xml
+ - type: bind
+ source: secrets
+ target: /lightstreamer/adapters/lightstreamer-kafka-connector/secrets
# kafka:
# image: 'docker.io/bitnami/kafka:latest'
@@ -38,5 +41,7 @@ services:
networks:
kafka-network:
+ name: lightstreamer-kafka-connector_default
+ # name: kafka-cluster-ssl_default
external: true
- # name: kafka-network
+
diff --git a/examples/quickstart/Dockerfile.kafka-connector b/examples/quickstart/Dockerfile.kafka-connector
new file mode 100644
index 00000000..9675265d
--- /dev/null
+++ b/examples/quickstart/Dockerfile.kafka-connector
@@ -0,0 +1,11 @@
+FROM lightstreamer
+
+ARG version
+
+COPY deploy/lightstreamer-kafka-connector-${version}.zip /tmp/lightstreamer-kafka-connector.zip
+USER root
+RUN apt-get -y update; \
+ apt-get install -y unzip; \
+ unzip /tmp/lightstreamer-kafka-connector.zip -d /lightstreamer/adapters
+
+USER lightstreamer
\ No newline at end of file
diff --git a/examples/quickstart/Dockerfile.producer b/examples/quickstart/Dockerfile.producer
new file mode 100644
index 00000000..a3e091b0
--- /dev/null
+++ b/examples/quickstart/Dockerfile.producer
@@ -0,0 +1,6 @@
+FROM eclipse-temurin:11
+ARG VERSION
+RUN mkdir /opt/producer
+
+COPY deploy/lightstreamer-kafka-connector-samples-all-0.1.0.jar /opt/producer/lightstreamer-kafka-connector-samples-all.jar
+CMD ["java", "-jar", "/opt/producer/lightstreamer-kafka-connector-samples-all.jar"]
diff --git a/examples/quickstart/adapters.xml b/examples/quickstart/adapters.xml
deleted file mode 100644
index 8aa2d5a4..00000000
--- a/examples/quickstart/adapters.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
- N
-
- com.lightstreamer.kafka_connector.adapter.KafkaMetadataAdapter
-
-
-
-
- com.lightstreamer.kafka_connector.adapter.KafkaConnectorAdapter
- log4j.properties
-
- broker:29092
- kafka-adapter-user-NEW
-
-
- info
- message
-
- IGNORE_AND_CONTINUE
-
-
-
- user
- item-template.user
- AVRO
-
- AVRO
-
- http://schema-registry:8081
- http://schema-registry:8081
-
- #{KEY.name}
- #{VALUE.info.age}
- #{VALUE.info.height}
- #{VALUE.addresses[0].zipcode}
- #{VALUE.addresses[1].zipcode}
- #{VALUE.documents['doc_id']['doc_id']}
- #{VALUE.documents['doc_id'].doc_type}
- #{VALUE.preferences['pref1']}
- #{VALUE.type}
- #{VALUE.signature}
- #{VALUE.union}
- #{PARTITION}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/examples/quickstart/build.sh b/examples/quickstart/build.sh
new file mode 100755
index 00000000..3dc0cb10
--- /dev/null
+++ b/examples/quickstart/build.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+DEPLOY_DIR=$(pwd)/deploy
+rm -fr $DEPLOY_DIR || true
+mkdir $DEPLOY_DIR
+cd ../..
+./gradlew distribuite
+
+cp deploy/lightstreamer-kafka-connector-0.1.0.zip $DEPLOY_DIR
+cp deploy/lightstreamer-kafka-connector-samples-all-0.1.0.jar $DEPLOY_DIR
+docker compose -f examples/quickstart/docker-compose.yaml up --remove-orphans
diff --git a/examples/quickstart/docker-compose.yaml b/examples/quickstart/docker-compose.yaml
new file mode 100644
index 00000000..070ceb21
--- /dev/null
+++ b/examples/quickstart/docker-compose.yaml
@@ -0,0 +1,46 @@
+---
+version: '2'
+services:
+ lightstreamer:
+ build:
+ dockerfile: Dockerfile.kafka-connector
+ args:
+ version: 0.1.0
+ # context: ../../
+ # depends_on:
+ # - broker
+ ports:
+ - 8080:8080
+
+ # producer:
+ # build:
+ # dockerfile: producer.Dockerfile
+ # args:
+ # VERSION: 0.1.0
+
+
+ # broker:
+ # image: confluentinc/confluent-local:latest
+ # ports:
+ # - "9092:9092"
+ # - "8082:8082"
+ # environment:
+ # KAFKA_NODE_ID: 1
+ # KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
+ # KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092'
+ # KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
+ # KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
+ # KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
+ # KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
+ # KAFKA_SSL_KEYSTORE_LOCATION: /etc/kafka/secrets/kafka.server.keystore.jks
+ # KAFKA_SSL_KEYSTORE_PASSWORD: password
+ # KAFKA_PROCESS_ROLES: 'broker,controller'
+ # KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
+ # KAFKA_LISTENERS: 'PLAINTEXT://broker:29092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:9092'
+ # KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
+ # KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
+ # KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
+ # KAFKA_REST_HOST_NAME: rest-proxy
+ # KAFKA_REST_BOOTSTRAP_SERVERS: 'broker:29092'
+ # KAFKA_REST_LISTENERS: "http://0.0.0.0:8082"
+ # CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
\ No newline at end of file
diff --git a/examples/quickstart/log4j.properties b/examples/quickstart/log4j.properties
deleted file mode 100644
index 22331c8d..00000000
--- a/examples/quickstart/log4j.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# 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.
-
-log4j.rootLogger=DEBUG, stdout
-log4j.logger.org.apache.kafka=WARN, stdout
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%d] [%c{2}] %p %m%n
-log4j.appender.stdout.Target=System.out
-
-log4j.appender.stderr=org.apache.log4j.ConsoleAppender
-log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
-log4j.appender.stderr.layout.ConversionPattern=[%d] [%t-%c] %p %m%n
-log4j.appender.stderr.Target=System.err
diff --git a/examples/quickstart/user-key.avsc b/examples/quickstart/user-key.avsc
deleted file mode 100644
index f4587a89..00000000
--- a/examples/quickstart/user-key.avsc
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "namespace": "example.avro",
- "type": "record",
- "name": "Key",
- "fields": [
- {
- "name": "name",
- "type": "string"
- },
- {
- "name": "id",
- "type": "string"
- }
- ]
-}
-
\ No newline at end of file
diff --git a/examples/quickstart/user-value.avsc b/examples/quickstart/user-value.avsc
deleted file mode 100644
index 9b30b40c..00000000
--- a/examples/quickstart/user-value.avsc
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "namespace": "example.avro",
- "type": "record",
- "name": "User",
- "fields": [
- {
- "name": "name",
- "type": "string"
- },
-
- {
- "name": "signature",
- "type": {
- "type": "fixed",
- "name": "Signature",
- "size": 4
- }
- },
- {
- "name": "type",
- "type": {
- "type": "enum",
- "name": "Type",
- "symbols": [
- "type1",
- "type2",
- "type3"
- ]
- }
- },
- {
- "name": "union",
- "type": ["string", "long"]
- },
-
- {
- "name": "info",
- "type": {
- "type": "record",
- "name": "Info",
- "fields": [
- {
- "name": "age",
- "type": "int"
- },
- {
- "name": "height",
- "type": "int"
- }
- ]
- }
- },
- {
- "name": "documents",
- "type": {
- "type": "map",
- "values": {
- "type": "record",
- "name": "Document",
- "fields": [
- {
- "name": "doc_id",
- "type": "string"
- },
- {
- "name": "doc_type",
- "type": "string"
- }
- ]
- }
- }
- },
- {
- "name": "preferences",
- "type": {
- "type": "map",
- "values": "string"
- }
- },
- {
- "name": "addresses",
- "type": {
- "type": "array",
- "items": {
- "type": "record",
- "name": "Address",
- "fields": [
- {
- "name": "zipcode",
- "type": "string"
- }
- ]
- }
- }
- },
- {
- "name": "friends",
- "type": {
- "type": "array",
- "items": "string"
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/examples/quickstart/user.avsc b/examples/quickstart/user.avsc
deleted file mode 100644
index a60f2d87..00000000
--- a/examples/quickstart/user.avsc
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "namespace": "example.avro",
- "type": "record",
- "name": "User",
- "fields": [
- {
- "name": "name",
- "type": "string"
- },
- {
- "name": "favorite_number",
- "type": [
- "int",
- "null"
- ]
- },
- {
- "name": "info",
- "type": {
- "type": "record",
- "name": "Info",
- "fields": [
- {
- "name": "age",
- "type": "int"
- },
- {
- "name": "height",
- "type": "int"
- }
- ]
- }
- },
- {
- "name": "addresses",
- "type": {
- "type": "array",
- "items": {
- "type": "record",
- "name": "Address",
- "fields": [
- { "name":"zipcode", "type": "string"}
- ]
- }
-
- }
- },
- {
- "name": "friends",
- "type": {
- "type": "array",
- "items": "string"
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 3f63f85a..7c202f40 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1 +1,2 @@
version = 0.1.0
+deployDirName = deploy
diff --git a/kafka-connector-samples/build.gradle b/kafka-connector-samples/build.gradle
new file mode 100644
index 00000000..13c8cb9e
--- /dev/null
+++ b/kafka-connector-samples/build.gradle
@@ -0,0 +1,33 @@
+plugins {
+ id 'lightstreamer-kafka-connector'
+ id 'java'
+}
+
+dependencies {
+ implementation group: 'info.picocli', name:'picocli', version:'4.7.5'
+ implementation group: 'org.slf4j', name: 'slf4j-reload4j', 'version': '2.0.10'
+ implementation group: 'org.apache.kafka', name:'kafka-clients', version:'7.5.3-ccs'
+ implementation group: 'io.confluent', name: 'kafka-avro-serializer', version:'7.5.3'
+ implementation group: 'io.confluent', name: 'kafka-json-serializer', version:'7.5.3'
+ implementation group: 'io.confluent', name: 'kafka-json-schema-serializer', version:'7.5.3'
+}
+
+task fatJar(type: Jar) {
+ manifest {
+ attributes 'Main-Class': "com.lightstreamer.kafka_connector.samples.producer.Producer"
+ }
+ archiveBaseName = rootProject.name + "-samples"
+ archiveAppendix = 'all'
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+ from {
+ configurations.compileClasspath.collect {
+ it.isDirectory() ? it : zipTree(it)
+ }
+ }
+ with jar
+}
+
+task distribuite(type: Copy) {
+ from fatJar
+ into "$rootDir/$deployDirName"
+}
diff --git a/kafka-connector-samples/src/main/java/com/lightstreamer/kafka_connector/samples/producer/Producer.java b/kafka-connector-samples/src/main/java/com/lightstreamer/kafka_connector/samples/producer/Producer.java
new file mode 100644
index 00000000..3979f6d3
--- /dev/null
+++ b/kafka-connector-samples/src/main/java/com/lightstreamer/kafka_connector/samples/producer/Producer.java
@@ -0,0 +1,116 @@
+
+/*
+ * Copyright (C) 2024 Lightstreamer Srl
+ *
+ * Licensed 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+*/
+
+package com.lightstreamer.kafka_connector.samples.producer;
+
+import org.apache.kafka.clients.producer.Callback;
+import org.apache.kafka.clients.producer.KafkaProducer;
+import org.apache.kafka.clients.producer.ProducerConfig;
+import org.apache.kafka.clients.producer.ProducerRecord;
+import org.apache.kafka.clients.producer.RecordMetadata;
+
+import picocli.CommandLine;
+import picocli.CommandLine.Option;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.SecureRandom;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+public class Producer implements Runnable {
+
+ @Option(
+ names = "--bootstrap-servers",
+ description = "The Kafka connection string",
+ required = true)
+ private String bootstrapServers;
+
+ @Option(names = "--topic", description = "The target topic", required = true)
+ private String topic;
+
+ @Option(
+ names = "--config-path",
+ description = "The configuration file path",
+ required = false,
+ defaultValue = "src/clients/producer/simple-config.properties")
+ private String configPath;
+
+ @Option(
+ names = "--period",
+ description = "The interval in ms between two successive executions",
+ required = false,
+ defaultValue = "250")
+ private int periodMs;
+
+ public void run() {
+ // BasicConfigurator.configure();
+ // Create producer configs
+ Properties properties = new Properties();
+ System.out.println(Paths.get(".").toAbsolutePath());
+ try (InputStream is = Files.newInputStream(Paths.get(this.configPath))) {
+ properties.load(is);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ properties.setProperty(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
+ // Create and start the producer.
+
+ try (KafkaProducer producer = new KafkaProducer<>(properties); ) {
+ int key = 0;
+ while (true) {
+ String message =
+ new SecureRandom()
+ .ints(20, 48, 122)
+ .mapToObj(Character::toString)
+ .collect(Collectors.joining());
+
+ String keyString = String.valueOf(key++);
+ ProducerRecord record =
+ new ProducerRecord(this.topic, keyString, message);
+ producer.send(
+ record,
+ new Callback() {
+ public void onCompletion(RecordMetadata metadata, Exception e) {
+ if (e != null) {
+ e.printStackTrace();
+ System.err.println("Send failed");
+ return;
+ }
+ System.out.printf(
+ "Sent record [key=%s,value=%s]%n to topic [%s]]%n",
+ record.key(),
+ record.value(),
+ record.topic(),
+ record.partition());
+ }
+ });
+ TimeUnit.MILLISECONDS.sleep(this.periodMs);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] args) {
+ new CommandLine(new Producer()).execute(args);
+ }
+}
diff --git a/connector/.classpath b/kafka-connector/.classpath
similarity index 100%
rename from connector/.classpath
rename to kafka-connector/.classpath
diff --git a/connector/.project b/kafka-connector/.project
similarity index 96%
rename from connector/.project
rename to kafka-connector/.project
index 458a704c..c51bd7b4 100644
--- a/connector/.project
+++ b/kafka-connector/.project
@@ -1,6 +1,6 @@
- connector
+ kafka-connector
Project connector created by Buildship.
diff --git a/connector/build.gradle b/kafka-connector/build.gradle
similarity index 85%
rename from connector/build.gradle
rename to kafka-connector/build.gradle
index 9a182190..b41df2b0 100644
--- a/connector/build.gradle
+++ b/kafka-connector/build.gradle
@@ -44,6 +44,11 @@ task cleanDeploy(type: Delete) {
sourceSets.main.java.srcDirs += ['src/clients/java']
+javadoc {
+ include '**/pub/KafkaConnectorMetadataAdapter.java'
+ exclude '**/pub/*ConnectionInfo*'
+}
+
distributions {
connector {
distributionBaseName = rootProject.name
@@ -58,10 +63,15 @@ distributions {
exclude "ls-adapter-inprocess*"
exclude "jsr305*"
}
+
+ from(javadoc) {
+ into "javadocs"
+ }
}
}
}
-task distribuite {
- dependsOn connectorDistZip
+task distribuite(type: Copy) {
+ from (connectorDistZip)
+ into "$rootDir/$deployDirName"
}
diff --git a/connector/src/clients/Producer.java b/kafka-connector/src/clients/Producer.java
similarity index 100%
rename from connector/src/clients/Producer.java
rename to kafka-connector/src/clients/Producer.java
diff --git a/connector/src/clients/consumer/Listeners.java b/kafka-connector/src/clients/consumer/Listeners.java
similarity index 100%
rename from connector/src/clients/consumer/Listeners.java
rename to kafka-connector/src/clients/consumer/Listeners.java
diff --git a/connector/src/clients/consumer/LsClient.java b/kafka-connector/src/clients/consumer/LsClient.java
similarity index 100%
rename from connector/src/clients/consumer/LsClient.java
rename to kafka-connector/src/clients/consumer/LsClient.java
diff --git a/connector/src/clients/kafka-producer.java b/kafka-connector/src/clients/kafka-producer.java
similarity index 100%
rename from connector/src/clients/kafka-producer.java
rename to kafka-connector/src/clients/kafka-producer.java
diff --git a/connector/src/clients/lsclient.java b/kafka-connector/src/clients/lsclient.java
similarity index 100%
rename from connector/src/clients/lsclient.java
rename to kafka-connector/src/clients/lsclient.java
diff --git a/connector/src/clients/producer/Producer.java b/kafka-connector/src/clients/producer/Producer.java
similarity index 100%
rename from connector/src/clients/producer/Producer.java
rename to kafka-connector/src/clients/producer/Producer.java
diff --git a/connector/src/clients/producer/avro-config.properties b/kafka-connector/src/clients/producer/avro-config.properties
similarity index 100%
rename from connector/src/clients/producer/avro-config.properties
rename to kafka-connector/src/clients/producer/avro-config.properties
diff --git a/connector/src/clients/producer/simple-config.properties b/kafka-connector/src/clients/producer/simple-config.properties
similarity index 100%
rename from connector/src/clients/producer/simple-config.properties
rename to kafka-connector/src/clients/producer/simple-config.properties
diff --git a/connector/src/connector/dist/README.md b/kafka-connector/src/connector/dist/README.md
similarity index 100%
rename from connector/src/connector/dist/README.md
rename to kafka-connector/src/connector/dist/README.md
diff --git a/connector/src/connector/dist/adapters.bcp.xml b/kafka-connector/src/connector/dist/adapters.bcp.xml
similarity index 100%
rename from connector/src/connector/dist/adapters.bcp.xml
rename to kafka-connector/src/connector/dist/adapters.bcp.xml
diff --git a/connector/src/connector/dist/adapters.xml b/kafka-connector/src/connector/dist/adapters.xml
similarity index 82%
rename from connector/src/connector/dist/adapters.xml
rename to kafka-connector/src/connector/dist/adapters.xml
index 06142675..ae213ae5 100644
--- a/connector/src/connector/dist/adapters.xml
+++ b/kafka-connector/src/connector/dist/adapters.xml
@@ -46,7 +46,7 @@
- "false": Disables the connection.
Default: "true". -->
secrets/kafka.consumer.truststore.jks
confluent
-
+
secrets/kafka.consumer.keystore.jks
confluent
@@ -125,7 +125,7 @@
test
- disable
+ true
@@ -144,33 +144,6 @@
AVRO
user-value.avsc
-
-
-
-
-
-
-
-
-
-
diff --git a/connector/src/connector/dist/log4j.properties b/kafka-connector/src/connector/dist/log4j.properties
similarity index 82%
rename from connector/src/connector/dist/log4j.properties
rename to kafka-connector/src/connector/dist/log4j.properties
index c71bf474..096e90ac 100644
--- a/connector/src/connector/dist/log4j.properties
+++ b/kafka-connector/src/connector/dist/log4j.properties
@@ -16,6 +16,7 @@
log4j.rootLogger=DEBUG, stdout
log4j.logger.org.apache.kafka=WARN, stdout
log4j.logger.QuickStart=TRACE, QuickStartFile
+log4j.logger.JsonStart=TRACE, JsonStartFile
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
@@ -32,3 +33,9 @@ log4j.appender.QuickStartFile=org.apache.log4j.RollingFileAppender
log4j.appender.QuickStartFile.layout=org.apache.log4j.PatternLayout
log4j.appender.QuickStartFile.layout.ConversionPattern=[%d] [%-10c{1}] %-5p %m%n
log4j.appender.QuickStartFile.File=quickstart.log
+
+# JsonStartFile logger appender
+log4j.appender.JsonStartFile=org.apache.log4j.RollingFileAppender
+log4j.appender.JsonStartFile.layout=org.apache.log4j.PatternLayout
+log4j.appender.JsonStartFile.layout.ConversionPattern=[%d] [%-10c{1}] %-5p %m%n
+log4j.appender.JsonStartFile.File=jsonstart.log
diff --git a/connector/src/connector/dist/user-key.avsc b/kafka-connector/src/connector/dist/user-key.avsc
similarity index 100%
rename from connector/src/connector/dist/user-key.avsc
rename to kafka-connector/src/connector/dist/user-key.avsc
diff --git a/connector/src/connector/dist/user-value.avsc b/kafka-connector/src/connector/dist/user-value.avsc
similarity index 100%
rename from connector/src/connector/dist/user-value.avsc
rename to kafka-connector/src/connector/dist/user-value.avsc
diff --git a/connector/src/docs/adapters-example.xml b/kafka-connector/src/docs/adapters-example.xml
similarity index 100%
rename from connector/src/docs/adapters-example.xml
rename to kafka-connector/src/docs/adapters-example.xml
diff --git a/connector/src/docs/fields-mapping.xml b/kafka-connector/src/docs/fields-mapping.xml
similarity index 100%
rename from connector/src/docs/fields-mapping.xml
rename to kafka-connector/src/docs/fields-mapping.xml
diff --git a/connector/src/docs/stock.json b/kafka-connector/src/docs/stock.json
similarity index 100%
rename from connector/src/docs/stock.json
rename to kafka-connector/src/docs/stock.json
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConnectorDataAdapter.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConnectorDataAdapter.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConnectorDataAdapter.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConnectorDataAdapter.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConnectorMetadataAdapter.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConnectorMetadataAdapter.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConnectorMetadataAdapter.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConnectorMetadataAdapter.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConsumerLoopConfigurator.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConsumerLoopConfigurator.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConsumerLoopConfigurator.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/ConsumerLoopConfigurator.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/Loop.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/Loop.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/Loop.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/Loop.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/Either.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/Either.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/Either.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/Either.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/LogFactory.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/LogFactory.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/LogFactory.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/LogFactory.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/MetadataListener.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/MetadataListener.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/MetadataListener.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/MetadataListener.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/NonNullKeyProperties.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/NonNullKeyProperties.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/NonNullKeyProperties.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/commons/NonNullKeyProperties.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/AbstractConfig.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/AbstractConfig.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/AbstractConfig.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/AbstractConfig.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/BrokerAuthenticationConfigs.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/BrokerAuthenticationConfigs.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/BrokerAuthenticationConfigs.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/BrokerAuthenticationConfigs.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/ConfigException.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/ConfigException.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/ConfigException.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/ConfigException.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/ConnectorConfig.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/ConnectorConfig.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/ConnectorConfig.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/ConnectorConfig.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/EncryptionConfigs.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/EncryptionConfigs.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/EncryptionConfigs.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/EncryptionConfigs.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/GlobalConfig.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/GlobalConfig.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/GlobalConfig.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/GlobalConfig.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/InfoItem.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/InfoItem.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/InfoItem.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/InfoItem.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/SchemaRegistryConfigs.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/SchemaRegistryConfigs.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/SchemaRegistryConfigs.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/SchemaRegistryConfigs.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/TopicsConfig.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/TopicsConfig.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/TopicsConfig.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/TopicsConfig.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/AuthenticationConfigs.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/AuthenticationConfigs.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/AuthenticationConfigs.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/AuthenticationConfigs.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/GssapiConfigs.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/GssapiConfigs.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/GssapiConfigs.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/GssapiConfigs.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/KeystoreConfigs.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/KeystoreConfigs.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/KeystoreConfigs.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/KeystoreConfigs.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/TlsConfigs.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/TlsConfigs.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/TlsConfigs.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/nested/TlsConfigs.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigTypes.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigTypes.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigTypes.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigTypes.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigsSpec.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigsSpec.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigsSpec.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigsSpec.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/consumers/AbstractConsumerLoop.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/consumers/AbstractConsumerLoop.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/consumers/AbstractConsumerLoop.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/consumers/AbstractConsumerLoop.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/consumers/ConsumerLoop.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/consumers/ConsumerLoop.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/consumers/ConsumerLoop.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/consumers/ConsumerLoop.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/ExpressionException.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/ExpressionException.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/ExpressionException.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/ExpressionException.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/Fields.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/Fields.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/Fields.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/Fields.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemExpressionEvaluator.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemExpressionEvaluator.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemExpressionEvaluator.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemExpressionEvaluator.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/Items.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/Items.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/Items.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/Items.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapper.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapper.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapper.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapper.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/AbstractLocalSchemaDeserializer.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/AbstractLocalSchemaDeserializer.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/AbstractLocalSchemaDeserializer.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/AbstractLocalSchemaDeserializer.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/BaseSelector.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/BaseSelector.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/BaseSelector.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/BaseSelector.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/KeySelector.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/KeySelector.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/KeySelector.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/KeySelector.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/KeySelectorSupplier.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/KeySelectorSupplier.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/KeySelectorSupplier.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/KeySelectorSupplier.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelector.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelector.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelector.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelector.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelectorSupplier.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelectorSupplier.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelectorSupplier.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelectorSupplier.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Schema.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Schema.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Schema.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Schema.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Selector.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Selector.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Selector.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Selector.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorExpressionParser.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorExpressionParser.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorExpressionParser.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorExpressionParser.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorSupplier.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorSupplier.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorSupplier.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorSupplier.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Selectors.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Selectors.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Selectors.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Selectors.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Value.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Value.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Value.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/Value.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueException.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueException.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueException.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueException.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueSelector.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueSelector.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueSelector.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueSelector.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueSelectorSupplier.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueSelectorSupplier.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueSelectorSupplier.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueSelectorSupplier.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValuesContainer.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValuesContainer.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValuesContainer.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValuesContainer.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordDeserializer.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordDeserializer.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordDeserializer.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordDeserializer.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordSelectorsSuppliers.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordSelectorsSuppliers.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordSelectorsSuppliers.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordSelectorsSuppliers.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeDeserializer.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeDeserializer.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeDeserializer.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeDeserializer.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeSelectorsSuppliers.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeSelectorsSuppliers.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeSelectorsSuppliers.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeSelectorsSuppliers.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/string/StringSelectorSuppliers.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/string/StringSelectorSuppliers.java
similarity index 100%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/string/StringSelectorSuppliers.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/string/StringSelectorSuppliers.java
diff --git a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/pub/KafkaConnectorMetadataAdapter.java b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/pub/KafkaConnectorMetadataAdapter.java
similarity index 92%
rename from connector/src/main/java/com/lightstreamer/kafka_connector/adapters/pub/KafkaConnectorMetadataAdapter.java
rename to kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/pub/KafkaConnectorMetadataAdapter.java
index ae7f9e6a..f6ae4764 100644
--- a/connector/src/main/java/com/lightstreamer/kafka_connector/adapters/pub/KafkaConnectorMetadataAdapter.java
+++ b/kafka-connector/src/main/java/com/lightstreamer/kafka_connector/adapters/pub/KafkaConnectorMetadataAdapter.java
@@ -41,6 +41,11 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+/**
+ * Base class for the Lightstreamer Kafak Connector implementation of the Metadata Provider.
+ *
+ * @see java.base/java.io
+ */
public abstract class KafkaConnectorMetadataAdapter extends LiteralBasedProvider {
private static KafkaConnectorMetadataAdapter METADATA_ADAPTER;
@@ -66,8 +71,12 @@ public final void init(@SuppressWarnings("rawtypes") Map params, File configDir)
protected void doInit(Map params, File configDir) throws MetadataProviderException {}
- // Used only for unit testing.
- public final Optional> itemsBySession(String sessionId) {
+ /**
+ * Only used for unit testing.
+ *
+ * @hidden
+ */
+ protected final Optional> itemsBySession(String sessionId) {
return Optional.ofNullable(tablesBySession.get(sessionId)).map(m -> Set.copyOf(m.keySet()));
}
@@ -77,6 +86,11 @@ private void configureLogging(File configDir) throws ConfigException {
this.log = LoggerFactory.getLogger(KafkaConnectorMetadataAdapter.class);
}
+ /**
+ * Only used internally.
+ *
+ * @hidden
+ */
public static final MetadataListener listener(String dataProviderName, boolean enabled) {
return new MetadataListenterImpl(METADATA_ADAPTER, dataProviderName, enabled);
}
@@ -166,7 +180,12 @@ private void notifyDataAdapter(String connectionName, boolean enabled) {
registeredDataAdapters.put(connectionName, new ConnectionInfo(connectionName, enabled));
}
- public final Optional lookUp(String connectionName) {
+ /**
+ * Only used for unit testing
+ *
+ * @hidden
+ */
+ protected final Optional lookUp(String connectionName) {
return Optional.ofNullable(registeredDataAdapters.get(connectionName));
}
@@ -177,7 +196,12 @@ public abstract void onUnsubscription(
public abstract void onUnsubscription(@Nonnull String sessionID, @Nonnull TableInfo[] tables)
throws NotificationException;
- public static record ConnectionInfo(String name, boolean enabled) {}
+ /**
+ * Only used internally.
+ *
+ * @hidden
+ */
+ protected static record ConnectionInfo(String name, boolean enabled) {}
private static class MetadataListenterImpl implements MetadataListener {
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/ConsumerLoopConfiguratorTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/ConsumerLoopConfiguratorTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/ConsumerLoopConfiguratorTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/ConsumerLoopConfiguratorTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/BrokerAuthenticationConfigsTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/BrokerAuthenticationConfigsTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/BrokerAuthenticationConfigsTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/BrokerAuthenticationConfigsTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/ConnectorConfigTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/ConnectorConfigTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/ConnectorConfigTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/ConnectorConfigTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/EncryptionConfigsTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/EncryptionConfigsTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/EncryptionConfigsTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/EncryptionConfigsTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/GlobalConfigTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/GlobalConfigTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/GlobalConfigTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/GlobalConfigTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/SchemaRegistryConfigsTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/SchemaRegistryConfigsTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/SchemaRegistryConfigsTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/SchemaRegistryConfigsTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/TopicsConfigTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/TopicsConfigTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/TopicsConfigTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/TopicsConfigTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigSpecTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigSpecTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigSpecTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/config/specs/ConfigSpecTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/consumers/ConsumerLoopTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/consumers/ConsumerLoopTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/consumers/ConsumerLoopTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/consumers/ConsumerLoopTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemTemplatesTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemTemplatesTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemTemplatesTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemTemplatesTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/ItemTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperAvroTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperAvroTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperAvroTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperAvroTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperJsonTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperJsonTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperJsonTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperJsonTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperStringTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperStringTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperStringTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/RecordMapperStringTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelectorTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelectorTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelectorTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/MetaSelectorTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorsTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorsTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorsTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/SelectorsTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/ValueTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordDeserializerTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordDeserializerTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordDeserializerTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordDeserializerTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordSelectorTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordSelectorTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordSelectorTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/avro/GenericRecordSelectorTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeDeserializerTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeDeserializerTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeDeserializerTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeDeserializerTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeSelectorTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeSelectorTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeSelectorTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/json/JsonNodeSelectorTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/string/StringSelectorsTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/string/StringSelectorsTest.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/string/StringSelectorsTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/mapping/selectors/string/StringSelectorsTest.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/ConnectorAdapterSetTest.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/pub/AdapterSetTest.java
similarity index 97%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/ConnectorAdapterSetTest.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/pub/AdapterSetTest.java
index ada07b55..a26c619c 100644
--- a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/ConnectorAdapterSetTest.java
+++ b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/pub/AdapterSetTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package com.lightstreamer.kafka_connector.adapters;
+package com.lightstreamer.kafka_connector.adapters.pub;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth8.assertThat;
@@ -28,10 +28,11 @@
import com.lightstreamer.interfaces.metadata.Mode;
import com.lightstreamer.interfaces.metadata.NotificationException;
import com.lightstreamer.interfaces.metadata.TableInfo;
+import com.lightstreamer.kafka_connector.adapters.ConnectorDataAdapter;
+import com.lightstreamer.kafka_connector.adapters.ConnectorMetadataAdapter;
import com.lightstreamer.kafka_connector.adapters.config.ConfigException;
import com.lightstreamer.kafka_connector.adapters.config.ConnectorConfig;
import com.lightstreamer.kafka_connector.adapters.config.GlobalConfig;
-import com.lightstreamer.kafka_connector.adapters.pub.KafkaConnectorMetadataAdapter;
import com.lightstreamer.kafka_connector.adapters.pub.KafkaConnectorMetadataAdapter.ConnectionInfo;
import com.lightstreamer.kafka_connector.adapters.test_utils.ConnectorConfigProvider;
@@ -46,7 +47,7 @@
import java.util.Optional;
import java.util.Set;
-public class ConnectorAdapterSetTest {
+public class AdapterSetTest {
private Path adapterDir;
private ConnectorMetadataAdapter connectorMetadataAdapter;
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/ConnectorConfigProvider.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/ConnectorConfigProvider.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/ConnectorConfigProvider.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/ConnectorConfigProvider.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/ConsumerRecords.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/ConsumerRecords.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/ConsumerRecords.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/ConsumerRecords.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/GenericRecordProvider.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/GenericRecordProvider.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/GenericRecordProvider.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/GenericRecordProvider.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/JsonNodeProvider.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/JsonNodeProvider.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/JsonNodeProvider.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/JsonNodeProvider.java
diff --git a/connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/SelectorsSuppliers.java b/kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/SelectorsSuppliers.java
similarity index 100%
rename from connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/SelectorsSuppliers.java
rename to kafka-connector/src/test/java/com/lightstreamer/kafka_connector/adapters/test_utils/SelectorsSuppliers.java
diff --git a/connector/src/test/resources/array.avsc b/kafka-connector/src/test/resources/array.avsc
similarity index 100%
rename from connector/src/test/resources/array.avsc
rename to kafka-connector/src/test/resources/array.avsc
diff --git a/connector/src/test/resources/document.avsc b/kafka-connector/src/test/resources/document.avsc
similarity index 100%
rename from connector/src/test/resources/document.avsc
rename to kafka-connector/src/test/resources/document.avsc
diff --git a/connector/src/test/resources/flights.json b/kafka-connector/src/test/resources/flights.json
similarity index 100%
rename from connector/src/test/resources/flights.json
rename to kafka-connector/src/test/resources/flights.json
diff --git a/connector/src/test/resources/multiarray.avsc b/kafka-connector/src/test/resources/multiarray.avsc
similarity index 100%
rename from connector/src/test/resources/multiarray.avsc
rename to kafka-connector/src/test/resources/multiarray.avsc
diff --git a/connector/src/test/resources/should-expand-items.csv b/kafka-connector/src/test/resources/should-expand-items.csv
similarity index 100%
rename from connector/src/test/resources/should-expand-items.csv
rename to kafka-connector/src/test/resources/should-expand-items.csv
diff --git a/connector/src/test/resources/should-matches-items.csv b/kafka-connector/src/test/resources/should-matches-items.csv
similarity index 100%
rename from connector/src/test/resources/should-matches-items.csv
rename to kafka-connector/src/test/resources/should-matches-items.csv
diff --git a/connector/src/test/resources/value.avsc b/kafka-connector/src/test/resources/value.avsc
similarity index 100%
rename from connector/src/test/resources/value.avsc
rename to kafka-connector/src/test/resources/value.avsc
diff --git a/settings.gradle b/settings.gradle
index eaa28396..be018fcf 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,2 +1,3 @@
rootProject.name = 'lightstreamer-kafka-connector'
-include 'connector'
+include 'kafka-connector'
+include 'kafka-connector-samples'