# Issues with messages \>= 4096 characters

**URL:** <https://forum.confluent.io/t/issues-with-messages-4096-characters/2386>\
**Category:** ksqlDB\
**Created:** [29 July 2021 18:32 UTC](https://forum.confluent.io/t/issues-with-messages-4096-characters/2386 "2021-07-29T18:32:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tparker](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tparker](https://forum.confluent.io/u/tparker)\
**Post date:** [29 July 2021 18:32 UTC](https://forum.confluent.io/t/issues-with-messages-4096-characters/2386/1 "2021-07-29T18:32:50Z")

</div>

Hi all, I have been working with KSQLDB for a few weeks and am running into what looks like a message size issue. I created a stream that moves a message from a topic to another topic based on a value. It works fine with messages less than 4095 characters. One extra character and the stream doesn’t process the message, one less character and it works fine. The message is JSON. Messages of 4096 characters (an interesting binary number) or larger doesn’t work. This is far under the Kafka max message size. I don’t see message size constraints associated with KSQLDB. any thoughts?

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [29 July 2021 19:18 UTC](https://forum.confluent.io/t/issues-with-messages-4096-characters/2386/2 "2021-07-29T19:18:58Z")

</div>

Hi @tparker , this sounds an interesting issue. Can you share steps to reproduce and details of what version you’re running please?

---

<div class="post-metadata">

**Author:** ![tparker](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tparker](https://forum.confluent.io/u/tparker)\
**Post date:** [29 July 2021 19:30 UTC](https://forum.confluent.io/t/issues-with-messages-4096-characters/2386/3 "2021-07-29T19:30:34Z")

</div>

Hi Thanks for the quick reply. I am using AWS MSK for kafka and we have setup KSQLDB as a stand alone service as outlined in [ksqlDB: The database purpose-built for stream processing applications.](https://ksqldb.io/quickstart-standalone-rpm.html#quickstart-content).

I have a main topic with a stream associated with it and one two other streams that send (routes) the messages to two other topics based on the field value.

Version: CLI v0.19.0, Server v0.19.0 located

Here are simplified commands:

```sql
CREATE STREAM test_split (TableName__c VARCHAR) 
WITH (KAFKA_TOPIC='srctotrgtmappingTopic', PARTITIONS=1, REPLICAS=1, VALUE_FORMAT='JSON');

CREATE STREAM test_contact 
WITH (KAFKA_TOPIC='test_contact', PARTITIONS=1, REPLICAS=1, VALUE_FORMAT='JSON') 
AS SELECT * FROM test_split WHERE LCASE(Target_Table__c) = 'contact';	

CREATE STREAM test_account WITH (KAFKA_TOPIC='test_account', PARTITIONS=1, REPLICAS=1, VALUE_FORMAT='JSON') 
AS SELECT * FROM test_split WHERE LCASE(Target_Table__c) = 'account';

```

```auto
show topics;
 Kafka Topic | Partitions | Partition Replicas
---------------------------------------------------------------
 test_account | 1 | 1
 test_contact | 1 | 1
 test_split | 1 | 1

show streams;
 Stream Name | Kafka Topic | Key Format | Value Format | Windowed
------------------------------------------------------------------------------------------------
 TEST_ACCOUNT | test_account | KAFKA | JSON | false
 TEST_CONTACT | test_contact | KAFKA | JSON | false
 TEST_SPLIT | test_split | KAFKA | JSON | false

```

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [29 July 2021 19:33 UTC](https://forum.confluent.io/t/issues-with-messages-4096-characters/2386/4 "2021-07-29T19:33:34Z")

</div>

> [@tparker](#):
>
> One extra character and the stream doesn’t process the message

Do you see an error in the ksqlDB server log when this happens? Or it’s just silently dropped? And is `srctotrgtmappingTopic` the source topic with the large value?

and is the data definitely in the topic in the first place? how’s it being populated?

---

<div class="post-metadata">

**Author:** ![tparker](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tparker](https://forum.confluent.io/u/tparker)\
**Post date:** [29 July 2021 20:17 UTC](https://forum.confluent.io/t/issues-with-messages-4096-characters/2386/5 "2021-07-29T20:17:41Z")

</div>

Ha, your a genius. You found the problem. LOL. You asked how it is being populated. It was being populated via the kafka-console-producer which apparently has an issue pasting data 4096 characters or more into it. When I checked the topic it has the data minus the tail end of the message.

FYI for anyone else running into a similar issue, I am running on windows with Ubuntu running as wsl. This new to me as I usually run on a Mac. Not sure if any of these contribute to the situation

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [29 July 2021 21:34 UTC](https://forum.confluent.io/t/issues-with-messages-4096-characters/2386/6 "2021-07-29T21:34:16Z")

</div>

Awesome - glad it’s working!

For consideration, `kafkacat` is my go-to tool of choice for getting data in (and out) of Kafka from the command line. More flexible that `kafka-console-producer`.

---

<div class="post-metadata">

**Author:** ![tparker](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@tparker](https://forum.confluent.io/u/tparker)\
**Post date:** [29 July 2021 22:30 UTC](https://forum.confluent.io/t/issues-with-messages-4096-characters/2386/7 "2021-07-29T22:30:47Z")

</div>

Thank you. I will check out that tool…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [28 August 2021 18:33 UTC](https://forum.confluent.io/t/issues-with-messages-4096-characters/2386/8 "2021-08-28T18:33:29Z")

</div>

This topic was automatically closed after 30 days. New replies are no longer allowed.
