Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Mirrormaker 2.0 delay and how to identify bottleneck



I am using mirrormaker 2 to copy data of one topic from source cluster to destination cluster. 

data is getting copied but I see 3 hours of lag. and I am not able to find the exact cause of it (whether the delay is at consumer side or producer ) as it is using kafka connect framework.

Below are the config details

test topic having 2 partition and replication factor as 3

number of messages coming into the source topic is 8K per second.


Expert Contributor



I would suggest you to tweak the following settings for better MirrorMaker scaling:



Kafka > Config > to 500000

Kafka > Config > to 60000

Kafka > Config > buffer.memory to 66000000

Kafka > Config > replica.fetch.max.bytes to 56700160

Kafka > Config > message.max.bytes to 56700160


2) You can increase the to 20 secs in line with (1/3rd of session time). This has to be set in CM > Kafka > Config > Kafka MirrorMaker Advanced Configuration Snippet (Safety Valve) for > = 20000 > Save changes > Restart MM.


3) Add




to Kafka safety value for


If you still face the same issue, then provide us the following details for further investigation:


1) Are you getting any errors in the broker logs and MM logs? OR we need broker and MM logs 

2) Run in each broker on the destination cluster a couple of times every 5 hours below to discard networking issues:

netstat -s | egrep "retransmited|sent out|socket|buffer|overflow|total packets received"

3) How many brokers are there in the Kafka cluster? 

4) Was it working fine before and have you made any recent changes? 


Thank you.