/jshell-mm2-client

A simple gradle project for jshell with Apache Kafka MirrorClient dependencies.

GNU General Public License v3.0GPL-3.0

jshell-mm2-client

A simple gradle project for jshell with Apache Kafka MirrorClient dependencies. (based on: jshell-on)

You can conveniently run Kafka DR tasks (like migrating __consumer_offsets) with this project.

Prerequisites

  • java (≥9)
  • gradle

How to Run

# open jshell with org.apache.kafka:connect-mirror-client
./jshell-mm2-client

# load properties file, with properties(String) defined in utils.jsh
Properties props = properties("xx.properties")

# instantiate MirrorClient from the Properties instance
# see: https://kafka.apache.org/31/javadoc/org/apache/kafka/connect/mirror/MirrorClient.html
MirrorMakerConfig mmConfig = new MirrorMakerConfig(props);
MirrorClientConfig mmClientConfig = mmConfig.clientConfig("cluster-name");
MirrorClient mmClient = new Mirrorclient(mmClientConfig);

To update the dependencies, update build.gradle. To add or modify the utility functions, update utils.jsh.

License

jshell-mm2-client is open-sourced and licenced under GNU GENERAL PUBLIC LICENSE version 3, by Lee Dongjin (dongjin@apache.org).