Installing and Using the Connector
Prerequisites
Before proceeding with this guide, make sure that the following programs are installed and functioning properly on your development machine:
- Java Development Kit version 8 or greater
- Java Runtime Environment version 8 or greater
- Apache Maven 3.3 or greater
- Apache Kafka with Kafka Connect
- AMPS Java client JAR
Kafka 4.0 and later require Java 17 or greater.
Obtaining the Connector
The connector can be installed from Maven Central Repository using the following dependency snippet:
<dependency>
<groupId>com.crankuptheamps.kafka</groupId>
<artifactId>amps-kafka-connector</artifactId>
<version>1.2.0</version>
</dependency>
Additionally, the source code can be found at the following repository:
https://github.com/60East/amps-integration-apache-kafka
Installing the Kafka Connect Plugin
Kafka Connect loads connectors from directories listed in the worker plugin.path.
Create a plugin directory for AMPS and copy the connector JAR and the AMPS Java client JAR into it:
plugins/
amps/
amps-kafka-connector-1.2.0.jar
amps_client.jar
Update the worker configuration to include the parent plugin directory.
For standalone mode, update config/connect-standalone.properties:
plugin.path=/path/to/plugins
For distributed mode, update config/connect-distributed.properties:
plugin.path=/path/to/plugins
After changing plugin.path, restart the Kafka Connect worker so it discovers the connector classes.
Connector Classes
The AMPS Kafka connector provides a source connector and a sink connector:
| Connector | Class |
|---|---|
| AMPS Source | com.crankuptheamps.kafka.AMPSKafkaSource |
| AMPS Sink | com.crankuptheamps.kafka.AMPSKafkaSink |
Use these class names in the Kafka Connect connector configuration.