Skip to content

Commit 52d719a

Browse files
committed
moved to kafka 4 and cp 7.9.0
1 parent aaba090 commit 52d719a

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

+2-2
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

+1-53
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
@@ -4087,58 +4087,6 @@ Teardown:
40874087
scripts/tear-down-multi-listener.sh
40884088
----
40894089

4090-
=== Custom Authorizer
4091-
4092-
Folder: link:authorizers/[authorizers]
4093-
4094-
This example shows how to create a custom authorizer.
4095-
4096-
IMPORTANT: this example is only for demo purposes and it's not intended to be deployed in production.
4097-
4098-
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
4099-
operations on topics without setting any ACLs on them.
4100-
4101-
Compile and package:
4102-
4103-
[source,bash]
4104-
----
4105-
cd authorizers
4106-
mvn clean package
4107-
cp -rf ./target/authorizers-1.2.1.jar ./jars
4108-
----
4109-
4110-
Run broker with custom authorizer on port 9092:
4111-
4112-
[source,bash]
4113-
----
4114-
scripts/bootstrap-auth.sh
4115-
----
4116-
4117-
Run a producer test using the link:authorizers/config/producer.properties[_producer.properties_] on listener port 9092:
4118-
4119-
Producer command:
4120-
4121-
[source,bash]
4122-
----
4123-
docker exec -it broker kafka-console-producer --broker-list broker:9093 --topic test --producer.config /tmp/producer.properties
4124-
----
4125-
4126-
Run a consumer test using the link:authorizers/config/consumer.properties[_consumer.properties_] on listener port 9092:
4127-
4128-
Consumer command:
4129-
4130-
[source,bash]
4131-
----
4132-
docker exec -it broker kafka-console-consumer --broker-list broker:9093 --topic test --consumer.config /tmp/consumer.properties
4133-
----
4134-
4135-
Teardown:
4136-
4137-
[source,bash]
4138-
----
4139-
scripts/tear-down-auth.sh
4140-
----
4141-
41424090
=== Custom Principal Builder
41434091

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

admin-client/pom.xml

+1-1
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

-6
This file was deleted.

authorizers/config/producer.properties

-5
This file was deleted.

authorizers/docker-compose.yml

-55
This file was deleted.
-5.77 KB
Binary file not shown.

authorizers/pom.xml

-32
This file was deleted.

0 commit comments

Comments
 (0)