2
2
3
3
import com .softwaremill .kmq .RedeliveryTracker ;
4
4
import com .softwaremill .kmq .example .UncaughtExceptionHandling ;
5
+ import org .apache .kafka .clients .CommonClientConfigs ;
6
+ import org .apache .kafka .common .config .SslConfigs ;
5
7
import org .slf4j .Logger ;
6
8
import org .slf4j .LoggerFactory ;
7
9
8
10
import java .io .Closeable ;
9
11
import java .io .IOException ;
12
+ import java .util .HashMap ;
13
+ import java .util .Map ;
10
14
11
15
import static com .softwaremill .kmq .example .standalone .StandaloneConfig .*;
12
16
@@ -15,6 +19,21 @@ class StandaloneRedeliveryTracker {
15
19
16
20
public static void main (String [] args ) throws InterruptedException , IOException {
17
21
UncaughtExceptionHandling .setup ();
22
+
23
+ /* EXAMPLE with extraConfig : SSL Encryption & SSL Authentication
24
+ Map extraConfig = new HashMap();
25
+ //configure the following three settings for SSL Encryption
26
+ extraConfig.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "SSL");
27
+ extraConfig.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, "/directory/kafka.client.truststore.jks");
28
+ extraConfig.put(SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG, "test1234");
29
+
30
+ // configure the following three settings for SSL Authentication
31
+ extraConfig.put(SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG, "/directory/kafka.client.keystore.jks");
32
+ extraConfig.put(SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG, "test1234");
33
+ extraConfig.put(SslConfigs.SSL_KEY_PASSWORD_CONFIG, "test1234");
34
+
35
+ Closeable redelivery = RedeliveryTracker.start(KAFKA_CLIENTS, KMQ_CONFIG, scala.Option.apply(extraConfig));
36
+ */
18
37
19
38
Closeable redelivery = RedeliveryTracker .start (KAFKA_CLIENTS , KMQ_CONFIG );
20
39
LOG .info ("Redelivery tracker started" );
@@ -24,4 +43,4 @@ public static void main(String[] args) throws InterruptedException, IOException
24
43
redelivery .close ();
25
44
LOG .info ("Redelivery tracker stopped" );
26
45
}
27
- }
46
+ }
0 commit comments