Skip to content

Commit b29c6fa

Browse files
committed
mm2
1 parent 8713c1c commit b29c6fa

Some content is hidden

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

43 files changed

+241
-1361
lines changed

README.adoc

+100-1
Original file line numberDiff line numberDiff line change
@@ -2284,7 +2284,106 @@ scripts/tear-down-oauth.sh
22842284
22852285
Example of a Mirror Maker v2 configuration Active/Active
22862286
2287-
link:mirror-maker2-tests/README.md[Mirror Maker 2 tests]
2287+
Run the example:
2288+
2289+
[source,bash]
2290+
----
2291+
scripts/bootstrap-mm2.sh
2292+
----
2293+
2294+
A source cluster on port 9092 and a destination cluster on port 9082 will be created.
2295+
2296+
Create TopicA on source cluster and TopicB on destination cluster
2297+
2298+
[source,bash]
2299+
----
2300+
docker exec broker kafka-topics --bootstrap-server broker:9092 --create --topic TopicA --replication-factor 1 --partitions 3
2301+
docker exec broker-destination kafka-topics --bootstrap-server broker-destination:9082 --create --topic TopicB --replication-factor 1 --partitions 3
2302+
----
2303+
2304+
Launch Mirror Maker, both direction:
2305+
2306+
[source,bash]
2307+
----
2308+
docker exec broker-destination bash -c 'export KAFKA_LOG4J_OPTS=-Dlog4j.configuration=file:/etc/kafka/connect-log4j.properties && connect-mirror-maker /tmp/mm2.properties'
2309+
----
2310+
2311+
Topic list on source cluster:
2312+
2313+
[source,bash]
2314+
----
2315+
docker exec broker kafka-topics --bootstrap-server broker:9092 --list
2316+
2317+
DC-Y.TopicB
2318+
DC-Y.checkpoints.internal
2319+
TopicA
2320+
__consumer_offsets
2321+
heartbeats
2322+
mm2-configs.DC-Y.internal
2323+
mm2-offsets.DC-Y.internal
2324+
mm2-status.DC-Y.internal
2325+
----
2326+
2327+
Topic list on destination cluster:
2328+
2329+
[source,bash]
2330+
----
2331+
docker exec broker-destination kafka-topics --bootstrap-server broker-destination:9082 --list
2332+
2333+
DC-X.TopicA
2334+
DC-X.checkpoints.internal
2335+
TopicB
2336+
__consumer_offsets
2337+
heartbeats
2338+
mm2-configs.DC-X.internal
2339+
mm2-offsets.DC-X.internal
2340+
mm2-status.DC-X.internal
2341+
----
2342+
2343+
Run Producer Perf Test on cluster source for TopicA:
2344+
2345+
[source,bash]
2346+
----
2347+
docker exec broker kafka-producer-perf-test --topic TopicA --num-records 10000 --record-size 100 --throughput -1 --producer-props acks=1 bootstrap.servers=broker:9092 buffer.memory=67108864 batch.size=8196
2348+
----
2349+
2350+
Run Producer Perf Test on cluster destination for TopicB:
2351+
2352+
[source,bash]
2353+
----
2354+
docker exec broker-destination kafka-producer-perf-test --topic TopicB --num-records 10000 --record-size 100 --throughput -1 --producer-props acks=1 bootstrap.servers=broker-destination:9082 buffer.memory=67108864 batch.size=8196
2355+
----
2356+
2357+
Verify Topic message size for TopicA (cluster 1) and for DCX.TopicA (cluster2):
2358+
2359+
[source,bash]
2360+
----
2361+
docker exec broker ls -ltr /tmp/kraft-combined-logs/TopicA-0
2362+
docker exec broker-destination ls -ltr /tmp/kraft-combined-logs/DC-X.TopicA-0
2363+
docker exec broker ls -ltr /tmp/kraft-combined-logs/TopicA-1
2364+
docker exec broker-destination ls -ltr /tmp/kraft-combined-logs/DC-X.TopicA-1
2365+
docker exec broker ls -ltr /tmp/kraft-combined-logs/TopicA-2
2366+
docker exec broker-destination ls -ltr /tmp/kraft-combined-logs/DC-X.TopicA-2
2367+
----
2368+
2369+
Verify Topic message size for TopicB (cluster 2) and for DCY.TopicB (cluster1):
2370+
2371+
[source,bash]
2372+
----
2373+
docker exec broker ls -ltr /tmp/kraft-combined-logs/DC-Y.TopicB-0
2374+
docker exec broker-destination ls -ltr /tmp/kraft-combined-logs/TopicB-0
2375+
docker exec broker ls -ltr /tmp/kraft-combined-logs/DC-Y.TopicB-1
2376+
docker exec broker-destination ls -ltr /tmp/kraft-combined-logs/TopicB-1
2377+
docker exec broker ls -ltr /tmp/kraft-combined-logs/DC-Y.TopicB-2
2378+
docker exec broker-destination ls -ltr /tmp/kraft-combined-logs/TopicB-2
2379+
----
2380+
2381+
Teardown:
2382+
2383+
[source,bash]
2384+
----
2385+
scripts/tear-down-mm2.sh
2386+
----
22882387
22892388
== Observability
22902389
-12 KB
Binary file not shown.

mirror-maker2-tests/README.md

-149
This file was deleted.

0 commit comments

Comments
 (0)