Skip to content

Commit

Permalink
Merge pull request #4 from OneCricketeer/ver-2.8.0
Browse files Browse the repository at this point in the history
bump: ver 2.8.0
  • Loading branch information
OneCricketeer authored Apr 29, 2021
2 parents 9ec08e2 + f530066 commit 6aa7807
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DOCKER_REGISTRY ?= ''
DOCKER_USER ?= cricketeerone
DOCKER_IMAGE ?= apache-kafka-connect
VERSION = 2.5.0
VERSION = 2.8.0

DOCKER_FQN = $(DOCKER_REGISTRY)$(DOCKER_USER)/$(DOCKER_IMAGE)

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Containerized [Apache Kafka Connect](http://kafka.apache.org/documentation/#connect)

<!-- Note: Version is listed in URL -->
![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/cricketeerone/apache-kafka-connect/2.5.0?logo=docker&style=flat-square)
![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/cricketeerone/apache-kafka-connect/2.5.0?logo=docker&label=size&style=flat-square)
![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/cricketeerone/apache-kafka-connect/2.8.0?logo=docker&style=flat-square)
![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/cricketeerone/apache-kafka-connect/2.8.0?logo=docker&label=size&style=flat-square)
![Docker Pulls](https://img.shields.io/docker/pulls/cricketeerone/apache-kafka-connect?label=pulls&logo=docker&style=flat-square)

[![GitHub](https://img.shields.io/github/license/OneCricketeer/apache-kafka-connect-docker?color=%23ce353d&logo=apache&style=flat-square)](https://github.com/OneCricketeer/apache-kafka-connect-docker/blob/master/LICENSE)
Expand Down Expand Up @@ -174,6 +174,8 @@ Redo the tutorial with more input data and partitions, then play with `docker-co

### Extending with new Connectors

> ***Disclaimer*** It is best to think of this image as a base upon which you can add your own Connectors. Below is the output of the default connector plugins, as provided by Apache Kafka project.
Connector plugins should preferably be placed into `/app/libs`, thus requiring an environment variable of `CONNECT_PLUGIN_PATH="/app/libs"`.

When using the `confluent-hub` versions, you can extend those images like so
Expand All @@ -191,22 +193,20 @@ Where `<connector-id>` is copied from one of the available sources on [Confluent

To re-iterate, `confluent-hub` is **not** part of the base image versions; they **only include** Connector classes provided by Apache Kafka. These are limited to File Sink/Source and MirrorSource Connector (MirrorMaker 2.0). In general, you'll probably want to add your own Connectors, as above, rather than use this image by itself.

#### Disclaimer

It is best to think of this image as a base upon which you can [add your own Connectors](#extending-with-new-connectors). Here's the output of the default connector plugins, as provided by Apache Kafka project.
#### Default Plugins

```bash
$ curl localhost:8083/connector-plugins | jq
[
{
"class": "org.apache.kafka.connect.file.FileStreamSinkConnector",
"type": "sink",
"version": "2.5.0"
"version": "2.8.0"
},
{
"class": "org.apache.kafka.connect.file.FileStreamSourceConnector",
"type": "source",
"version": "2.5.0"
"version": "2.8.0"
},
{
"class": "org.apache.kafka.connect.mirror.MirrorCheckpointConnector",
Expand All @@ -232,7 +232,7 @@ The File Source/Sink are **not** to be used in production, and is only really me
>
> ...
>
> [files] have trivially structured data -- each line is just a string. Almost **_all practical connectors_** will need schemas with more complex data formats.
> files have trivially structured data -- each line is just a string. Almost **_all practical connectors_** will need schemas with more complex data formats.
That being said, the MirrorSource would be a more real-world example

Expand Down
18 changes: 9 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ version: '3'

services:
zookeeper:
image: bitnami/zookeeper:3.5.7-debian-10-r23
image: bitnami/zookeeper:3.6.2-debian-10-r186
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
volumes:
- 'zookeeper_data:/bitnami/zookeeper'
kafka:
image: bitnami/kafka:2.4.1-debian-10-r58
image: bitnami/kafka:2.8.0-debian-10-r7
depends_on:
- zookeeper
restart: unless-stopped
Expand All @@ -23,17 +23,17 @@ services:
- $PWD/lipsum.txt:/data/lipsum.txt:ro # Some data to produce
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_DELETE_TOPIC_ENABLE=true
- KAFKA_LOG_RETENTION_HOURS=48 # 2 days of retention for demo purposes
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CFG_DELETE_TOPIC_ENABLE=true
- KAFKA_CFG_LOG_RETENTION_HOURS=48 # 2 days of retention for demo purposes
# https://rmoff.net/2018/08/02/kafka-listeners-explained/
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
- KAFKA_LISTENERS=PLAINTEXT://:29092,PLAINTEXT_HOST://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
- KAFKA_CFG_LISTENERS=PLAINTEXT://:29092,PLAINTEXT_HOST://:9092
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092

# Jib app
connect-jib:
image: cricketeerone/apache-kafka-connect:2.5.0
image: cricketeerone/apache-kafka-connect:2.8.0
depends_on:
- kafka
ports:
Expand Down
24 changes: 15 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>cricket.jmoore</groupId>
<artifactId>kafka-connect-docker</artifactId>
<version>2.5.0</version>
<version>2.8.0</version>
<packaging>jar</packaging>

<properties>
Expand All @@ -14,23 +14,24 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

<kafka.version>2.5.0</kafka.version>
<kafka.version>2.8.0</kafka.version>
<!-- Kafka Dependencies : https://github.com/apache/kafka/blob/2.5/gradle/dependencies.gradle -->
<jetty.version>9.4.24.v20191120</jetty.version>
<jersey.version>2.28</jersey.version>
<jackson.version>2.10.3</jackson.version> <!-- Upgraded -->
<jetty.version>9.4.39.v20210325</jetty.version>
<jersey.version>2.31</jersey.version>
<jackson.version>2.10.5</jackson.version>
<jackson.databind.version>2.10.5.1</jackson.databind.version>
<slf4j.version>1.7.30</slf4j.version>
<!-- Extras -->
<slf4j.version>1.7.30</slf4j.version> <!-- Added -->
<log4j2.version>2.13.3</log4j2.version> <!-- Replace log4j 1.x -->

<!-- Tests -->
<junit.version>5.6.2</junit.version>
<junit.version>5.7.0</junit.version>
<assertj.version>3.16.1</assertj.version>

<!-- Packaging -->
<mainClass>org.apache.kafka.connect.cli.ConnectDistributedWrapper</mainClass>
<jib-maven-plugin.version>2.2.0</jib-maven-plugin.version>
<jib.from.image>openjdk:11-jre-slim</jib.from.image>
<jib-maven-plugin.version>3.0.0</jib-maven-plugin.version>
<jib.from.image>adoptopenjdk:11-jre</jib.from.image>
<jib.to.image>cricketeerone/apache-kafka-connect</jib.to.image>
</properties>

Expand All @@ -44,6 +45,11 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.databind.version}</version>
</dependency>
<!-- Jetty -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand Down

0 comments on commit 6aa7807

Please sign in to comment.