Skip to content

Commit ca1d855

Browse files
authored
Merge pull request #66 from hifly81/kafka-4
moved to kafka 4 and cp 7.9.0
2 parents 18d2841 + 62926bd commit ca1d855

File tree

59 files changed

+196
-588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+196
-588
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
KAFKA_VERSION=3.9.0
2-
CONFLUENT_VERSION=7.8.0
1+
KAFKA_VERSION=4.0.0
2+
CONFLUENT_VERSION=7.9.0
33
POSTGRES_VERSION=10.5
44
POSTGRES_ALPINE_VERSION=14.1-alpine
55
KEYCLOAK_VERSION=legacy

README.adoc

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= Practical examples with Apache Kafka®
22
:author: Giovanni Marigi
33
4-
:revdate: November 08, 2024
4+
:revdate: March 20, 2025
55
:revnumber: 1.2.1
66
:version-label!:
77
:toc: left
@@ -4096,58 +4096,6 @@ Teardown:
40964096
scripts/tear-down-multi-listener.sh
40974097
----
40984098

4099-
=== Custom Authorizer
4100-
4101-
Folder: link:authorizers/[authorizers]
4102-
4103-
This example shows how to create a custom authorizer.
4104-
4105-
IMPORTANT: this example is only for demo purposes and it's not intended to be deployed in production.
4106-
4107-
Custom Authorizer link:authorizers/src/main/java/org/hifly/kafka/authorizer/DummyAuthorizer.java[_org.hifly.kafka.authorizer.DummyAuthirizer_] extends the basic _AclAuthorizer_ and allows authenticated users to execute
4108-
operations on topics without setting any ACLs on them.
4109-
4110-
Compile and package:
4111-
4112-
[source,bash]
4113-
----
4114-
cd authorizers
4115-
mvn clean package
4116-
cp -rf ./target/authorizers-1.2.1.jar ./jars
4117-
----
4118-
4119-
Run broker with custom authorizer on port 9092:
4120-
4121-
[source,bash]
4122-
----
4123-
scripts/bootstrap-auth.sh
4124-
----
4125-
4126-
Run a producer test using the link:authorizers/config/producer.properties[_producer.properties_] on listener port 9092:
4127-
4128-
Producer command:
4129-
4130-
[source,bash]
4131-
----
4132-
docker exec -it broker kafka-console-producer --broker-list broker:9093 --topic test --producer.config /tmp/producer.properties
4133-
----
4134-
4135-
Run a consumer test using the link:authorizers/config/consumer.properties[_consumer.properties_] on listener port 9092:
4136-
4137-
Consumer command:
4138-
4139-
[source,bash]
4140-
----
4141-
docker exec -it broker kafka-console-consumer --broker-list broker:9093 --topic test --consumer.config /tmp/consumer.properties
4142-
----
4143-
4144-
Teardown:
4145-
4146-
[source,bash]
4147-
----
4148-
scripts/tear-down-auth.sh
4149-
----
4150-
41514099
=== Custom Principal Builder
41524100

41534101
Folder: link:principal-builder/[principal-builder]

admin-client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<dependencies>
1515
<dependency>
1616
<groupId>org.apache.kafka</groupId>
17-
<artifactId>kafka_2.12</artifactId>
17+
<artifactId>kafka_2.13</artifactId>
1818
</dependency>
1919

2020
<dependency>

authorizers/config/consumer.properties

Lines changed: 0 additions & 6 deletions
This file was deleted.

authorizers/config/producer.properties

Lines changed: 0 additions & 5 deletions
This file was deleted.

authorizers/docker-compose.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.
-5.77 KB
Binary file not shown.

authorizers/pom.xml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)