I've tried to run mirrormaker tools in async mode and I getWARN Produce request with correlation id 263 failed due to[benchmark1,30]: kafka.common.MessageSizeTooLargeException(kafka.producer.async.DefaultEventHandler)

I don't get error in sync mode. My message.max.bytes is default(1000000). As I understand the difference between sync and async modeis that async collects batches before sending. Does it mean that batchshould be less than message.max.bytes, or any single message withinbatch should be less than that.

With compression, the batch of messages are compressed in to a "single"wrapper message and sent to the broker, and the broker will reject therequest if this single message's size is larger than 1MB. So you need toeither change your max request size on broker or reduce your producer batchsize.

What would you recommend in this case? Bump up the max.message.bytes,use sync producer or lower batch.num.messages? Also does it matter onwhich side mirrormaker is located, source or target one?

And another related question: as I understand, potentially offsetsmight be different for source and target, and if the whole datacenteris lost, you probably loose offsets in zookeeper as well. What is yourstrategy to switch over producers and consumers to the new cluster,given consumer should pickup from the same point where it was droppedin another datacenter?

You can try to reduce batch.num.messages first and see if the throughputgets affected.

For your second question, we do not have a good solution to that since theoffsets are not consistent across data centers like you said. One way wedid is to have the consumer consuming both data centers, but keep the slavedata center's consumer do no-op; once the master data center is totallygone, turn the nob to let the slave data center's consumers to both consumeand process. Doing so still do not give you consistency as you may consumeduplicates or data loss, but gives you a relatively close point of resumingcompared with the previous consumer.