kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gwen Shapira <gshap...@cloudera.com>
Subject Re: Handling multi-line messages?
Date Mon, 09 Feb 2015 16:57:58 GMT
Since the console-consumer seems to display strings correctly, it sounds
like an issue with LogStash parser. Perhaps you'll have better luck asking
on LogStash mailing list?

Kafka just stores the bytes you put in and gives the same bytes out when
you read messages. There's no parsing or encoding done in Kafka itself
(other than the encoder/decoder you use in producer / consumer)

Gwen

On Mon, Feb 9, 2015 at 6:23 AM, Scott Chapman <scott@woofplanet.com> wrote:

> So, avoiding a bit of a long explanation on why I'm doing it this way...
>
> But essentially, I am trying to put multi-line messages into kafka and then
> parse them in logstash.
>
> What I think I am seeing in kafka (using console-consumer) is this:
>  "line 1 \nline 2 \nline 3\n"
>
> Then when I get it into logstash I am seeing it as:
>    {
> "message" => "line 1 \\nline 2 \\nline \n",
> "@version" => "1",
> "@timestamp" => "2015-02-09T13:55:36.566Z",
>   }
>
> My question is, is this what I should expect? I think I can probably figure
> out take the single line and break it apart in logstash. But do I need to?
>
> Any thoughts?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message