kcat icon indicating copy to clipboard operation
kcat copied to clipboard

MAC Version : Producer with delimiter problems

Open jcmonsalve2021 opened this issue 3 years ago • 18 comments

Hi, with the new version 1.7.0 I have problems when I try to produce messages, apparently the problem is because the kcat version does not recognize and no other delimiter characters that I enter with the -D option

jcmonsalve2021 avatar Sep 09 '21 21:09 jcmonsalve2021

Please provide your full command line.

edenhill avatar Sep 13 '21 05:09 edenhill

Hi , I used : kcat -F ./kafkacat.conf -P -t mytopic kcat -F ./kafkacat.conf -P -t mytopic -D #

But messages only was dispach when I use Control+D

jcmonsalve2021 avatar Sep 13 '21 13:09 jcmonsalve2021

You probably need to escape the #, otherwise the shell will remove it as it is the shell comment token. Try kcat ... -D '#'

edenhill avatar Sep 13 '21 13:09 edenhill

mmm ... I continue with the same problem, the messages are only sent if I press Control + D, but I can't identify if it is a version problem or something in my encoding ... but the sure thing is that with the previous version of kafkacat I had no problems ... for some reason the new version cannot identify any delimiter ... nor newline ... nor any that is entered with the -D option

jcmonsalve2021 avatar Sep 13 '21 13:09 jcmonsalve2021

I believe the problem is that your terminal buffers its output (waiting for newline).

You can verify this by trying something like: echo 'a#b#c#d#' | kcat -F kafkacat.conf -P -t mytopic -D '#'

edenhill avatar Sep 13 '21 14:09 edenhill

Hi, you're right ... for some reason my terminal doesn't send a new line ... but I still don't know why ... Thanks a lot ...

jcmonsalve2021 avatar Sep 13 '21 15:09 jcmonsalve2021

Hello :) I have the same issue on Mac as @jcmonsalve2021. If I give to the kcat command a file, it does not recognise any delimiter. The work-around used was to echo the content of the file similarly to @edenhill's command echo 'a#b#c#d#' | kcat -F kafkacat.conf -P -t mytopic -D '#' but this is a bit troublesome. Previous version of kcat did not have this issue.

GeorgianaLoba avatar Nov 02 '21 15:11 GeorgianaLoba

@jcmonsalve2021 if you are trying to send message from a file with a delimiter embedded in the file, you need to use the -l option:

  -l         Send messages from a file separated by
             delimiter, as with stdin.
             (only one file allowed)

andrek-data-axle avatar Mar 14 '22 15:03 andrek-data-axle

Having the same issue. Why has this not been addressed? Previous Version didn't have this Problem.

DanielBo avatar Apr 07 '22 08:04 DanielBo

@DanielBo Please be more specific. Provide command lines, input data, expected behaviour, actual behaviour.

edenhill avatar Apr 07 '22 08:04 edenhill

I do: kcat -b localhost:9092 -t chat -P

write test into the command line and hit enter. Consumer wont show the message until i hit ctrl+d

Running on an apple silicon mac, using iterm2 and zsh.

DanielBo avatar Apr 07 '22 08:04 DanielBo

Just press enter a couple of times

edenhill avatar Apr 07 '22 09:04 edenhill

I found the issue, fix is coming up

edenhill avatar Apr 07 '22 10:04 edenhill

Just press enter a couple of times

I also have the same problem and I tried out this workaround but after pressing enter for 600 times I gave up.

nemzsom avatar Apr 07 '22 10:04 nemzsom

You actually need to press enter 1024 times 😄 .. that's the size of the input buffer... Seriously though, soon fixed.

edenhill avatar Apr 07 '22 10:04 edenhill

Two thousand years later 👀

mahditakrim avatar May 08 '22 13:05 mahditakrim

@edenhill Facing this issue on Mac, I see this issue is fixed but still not released.

saifat29 avatar Jun 22 '22 17:06 saifat29

@edenhill When do you plan to release the fixed version?

nemzsom avatar Nov 30 '22 10:11 nemzsom