java - How to create multiple Kafka clusters on same L2 network? -


i have 12 kafka nodes on same l2 network.

i want create 4 kafka clusters (each 3 nodes) on same l2 network.

is possible , how? if not what's workaround?

a kafka cluster defined zookeeper data model members use. so, if want brokers belong given cluster, have make them point same zookeeper namespace. in practical terms, if want have 4 clusters need 4 different chroots in zookeeper ensemble , make each cluster use different one. example, mebers of cluster use zookeeper.connect=127.0.0.1:2181/cluster/a, members of cluster b use zookeeper.connect=127.0.0.1:2181/cluster/b , on. of course alternative use separated zookeeper ensembles each cluster.

from zookeeper programmer's guide

an optional "chroot" suffix may appended connection string. run client commands while interpreting paths relative root (similar unix chroot command). if used example like: "127.0.0.1:4545/app/a" or "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002/app/a" client rooted @ "/app/a" , paths relative root - ie getting/setting/etc... "/foo/bar" result in operations being run on "/app/a/foo/bar" (from server perspective). feature particularly useful in multi-tenant environments each user of particular zookeeper service rooted differently. makes re-use simpler each user can code his/her application if rooted @ "/", while actual location (say /app/a) determined @ deployment time.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -