# Mirror Maker 2 connector trying to write bigger messages than origin

**URL:** <https://forum.confluent.io/t/mirror-maker-2-connector-trying-to-write-bigger-messages-than-origin/5167>\
**Category:** Kafka Connect\
**Created:** [30 May 2022 08:06 UTC](https://forum.confluent.io/t/mirror-maker-2-connector-trying-to-write-bigger-messages-than-origin/5167 "2022-05-30T08:06:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kuro](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/kuro/32/1809_2.png) [@kuro](https://forum.confluent.io/u/kuro)\
**Post date:** [31 May 2022 11:43 UTC](https://forum.confluent.io/t/mirror-maker-2-connector-trying-to-write-bigger-messages-than-origin/5167/3 "2022-05-31T11:43:27Z")

</div>

Hi Daniel,

You are absolutely right!

I was configuring the compression at topic level, and the broker detected a bigger message that it can handle **before** compressing, hence the error I shown. I was thinking that if the compressed message fits in the topic, the broker must accept it but that doesn’t seem to be the case.

Setting the compression in the producer of the worker solved the problem. To make this property easier to set only by the topics that need compression, I allowed it to be overriden by the connectors:

Worker config:

> `connector.client.config.override.policy=All`

Connector config:

> “producer.override.compression.type”: “gzip”  
> “topic.creation.default.compression.type”: “producer”

It’s a shame that Mirror Maker is not able to identify source compression on the fly 😢 .

Thanks a lot for your help and have a great day!  
Brais

---

_[View the full topic](https://forum.confluent.io/t/mirror-maker-2-connector-trying-to-write-bigger-messages-than-origin/5167)._
