# MessageSizeTooLargeException

**URL:** <https://discuss.elastic.co/t/messagesizetoolargeexception/146894>\
**Category:** Logstash\
**Created:** [August 31, 2018, 4:12pm UTC](https://discuss.elastic.co/t/messagesizetoolargeexception/146894 "2018-08-31T16:12:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ccoqueiro](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@ccoqueiro](https://discuss.elastic.co/u/ccoqueiro)\
**Post date:** [August 31, 2018, 4:12pm UTC](https://discuss.elastic.co/t/messagesizetoolargeexception/146894/1 "2018-08-31T16:12:40Z")

</div>

Hi All,

I'm new here and sorry if put this topic in wrong path. So, I treid to use logstash plugin version 2.3.4, in this case, the logstash connect in a topic in the kafka and sendo the output for other element, but, when i tried to up the plugin, i have this error:

Kafka::Consumer caught exception: Java::KafkaCommon::MessageSizeTooLargeException  
Found a message larger than the maximum fetch size of this consumer on topic maaBAAggregator partition 5 at fetch offset 290980507. Increase the fetch size, or decrease the maximum message size the broker will allow.

I tried do put the fetch.message.max.bytes property in consumer file configuration on kafka, but without success.

Has anyone ever been through something similar?

Thank you so much

---

<div class="post-metadata">

**Author:** ![ccoqueiro](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@ccoqueiro](https://discuss.elastic.co/u/ccoqueiro)\
**Post date:** [September 17, 2018, 7:15pm UTC](https://discuss.elastic.co/t/messagesizetoolargeexception/146894/3 "2018-09-17T19:15:38Z")

</div>

Hi All,

I was able to solve this issue, with the help of a co-worker.

Resolution(At least in my case): Set the variable fetch\_message\_max\_bytes in logstash plugin configuration (plugin.conf) with the same value configured in the variable message.max.bytes in the broker server.

I hope you can help someone with the same scenario.

Cheers

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 15, 2018, 7:15pm UTC](https://discuss.elastic.co/t/messagesizetoolargeexception/146894/4 "2018-10-15T19:15:42Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
