Mirror Maker 2 is a powerful and flexible tool for moving Kafka events between Kafka clusters. These demos aim to inspire you to think about different ways that you could use it in your own projects.
A great way to learn how to use it is to play with it for yourself, so this repo includes Ansible playbooks that create examples of a variety of different Mirror Maker topologies.
These demonstrations all run in a single OpenShift cluster, using separate namespaces to represent "regions".
To see the requirements for creating these demos, see REQUIREMENTS.md.
A more detailed description of what these demos illustrate can be found in the blog posts starting from https://dalelane.co.uk/blog/?p=5098
Ansible playbook: 01-aggregate-central/setup.yaml
Example of how to run the playbook: setup-01-aggregate-central.sh
To see the events received by the consumer application running in the "Europe region", you can run the consumer-europe.sh
script.
Ansible playbook: 02-aggregate-distributed/setup.yaml
Example of how to run the playbook: setup-02-aggregate-distributed.sh
Ansible playbook: 03-broadcast/setup.yaml
Example of how to run the playbook: setup-03-broadcast.sh
To see the events received by the consumer applications, you can run the consumer-northamerica.sh
and consumer-southamerica.sh
scripts.
Ansible playbook: 04-shared-aggregate/setup.yaml
Example of how to run the playbook: setup-04-shared-aggregate.sh
To see the events received by the consumer applications, you can run the consumer scripts:
Ansible playbooks:
Example of how to run the playbooks:
Ansible playbooks:
06-backup-restore/initial-setup.yaml
06-backup-restore/recreate-from-backup.yaml
06-backup-restore/resume-applications.yaml
06-backup-restore/setup-new-backup.yaml
Example of how to run the playbooks:
Ansible playbooks:
07-migration/initial-setup.yaml
07-migration/migrate-topics.yaml
07-migration/pause-producers.yaml
07-migration/migrate-consumers.yaml
07-migration/migrate-producers.yaml
07-migration/cleanup.yaml
Example of how to run the playbooks: