What is the difference between a Producer/Consumer vs Publisher/Subscriber architecture?
Avatar Idan Asulin
Apr 16, 2023
13 14 15
What is the difference between RabbitMQ vs IBM MQ vs Memphis?
Avatar Yaniv Ben Hemo
Apr 16, 2023
4 5 6
When should I use Redis Pub/Sub vs RabbitMQ vs Memphis?
Avatar Idan Asulin
Apr 16, 2023
8 9 10
What is the difference between SQS vs RabbitMQ vs Memphis?
Avatar Idan Asulin
Apr 16, 2023
5 6 7
What is the difference between RabbitMQ vs ZeroMQ vs Memphis?
Avatar Idan Asulin
Apr 16, 2023
9 10 11
What is the difference between Kafka vs ZeroMQ vs Memphis?
Avatar Yaniv Ben Hemo
Apr 16, 2023
2 3 4
What is the difference between Azure Event Hub vs Kafka vs Memphis?
Avatar Idan Asulin
Apr 16, 2023
5 6 7
How does ActiveMQ vs RabbitMQ vs Kafka vs Memphis work?
Avatar Idan Asulin
Apr 16, 2023
7 8 9
What is ActiveMQ vs IBM MQ vs Memphis?
Avatar Yaniv Ben Hemo
Apr 16, 2023
3 4 5
How to change the number of replicas of a Kafka topic?
4 5 6
Memphis Approach

If you want to increase the number of replicas of a Kafka topic, here’s what you need to do. 

First, specify the replicas in a reassignment JSON file. For instance, you can create a JSON file called increase-replicas.json and add the following content to it:

{“version”:1,

“partitions”:[

{“topic”: “signals”, “partition”: 0, “replicas”: [0,1,2]}, 

{“topic”: “signals”, “partition” :1, “replicas”: [0,1,2]},

]} 

Next, use the file with the kafka-reassign-partitions (or kafka-reassign-partitions.sh depending on the package) tool, specifically with the –execute option. Here’s how that command will look:

kafka-reassign-partitions –zookeeper localhost:2181 –reassignment-json-file increase-replicas.json –execute 

Finally, use the kafka-topics (or kafka-topics.sh) tool to verify the replication factor. For that, do:

kafka-topics –zookeeper localhost:2181 –topic signals –describe 

Memphis Approach

At the moment, Memphis does not support multiple partitions. Partitions will be available in the coming versions.