Der Producer verwendet den UniformStickyPartitioner
authorKai Moritz <kai@juplo.de>
Sat, 2 Apr 2022 18:25:34 +0000 (20:25 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 2 Apr 2022 18:28:01 +0000 (20:28 +0200)
README.sh
docker-compose.yml
pom.xml
src/main/java/de/juplo/kafka/EndlessProducer.java

index 3ec2781..d73d41a 100755 (executable)
--- a/README.sh
+++ b/README.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-IMAGE=juplo/endless-producer:1.0-SNAPSHOT
+IMAGE=juplo/uniform-sticky:1.0-SNAPSHOT
 
 if [ "$1" = "cleanup" ]
 then
index d715e66..c75d746 100644 (file)
@@ -37,7 +37,7 @@ services:
     command: sleep infinity
 
   producer:
-    image: juplo/endless-producer:1.0-SNAPSHOT
+    image: juplo/uniform-sticky:1.0-SNAPSHOT
     ports:
       - 8000:8080
     environment:
diff --git a/pom.xml b/pom.xml
index 267e035..9fd2ad5 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -12,8 +12,8 @@
   </parent>
 
   <groupId>de.juplo.kafka</groupId>
-  <artifactId>endless-producer</artifactId>
-  <name>Endless Producer: a Simple Producer that endlessly writes numbers into a topic</name>
+  <artifactId>uniform-sticky</artifactId>
+  <name>Uniform Sticky: a version of the Endless Producer, that uses uniform-sticky-partitioner</name>
   <version>1.0-SNAPSHOT</version>
 
   <dependencies>
index 8b3743d..d283772 100644 (file)
@@ -42,6 +42,7 @@ public class EndlessProducer implements Runnable
     props.put("client.id", clientId);
     props.put("acks", acks);
     props.put("metadata.max.age.ms", "1000");
+    props.put("partitioner.class", "org.apache.kafka.clients.producer.UniformStickyPartitioner");
     props.put("key.serializer", StringSerializer.class.getName());
     props.put("value.serializer", StringSerializer.class.getName());