-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to send messages of 1MB or greater #16
Comments
p.client.conf["message.max.bytes"] = 36423360
p.client.conf["max.message.bytes"] = 36423360 Ouch, this is not supposed to work 😨 Try the following instead: conf = Dict("message.max.bytes" => 36423360, "max.message.bytes" => 36423360)
p = KafkaProducer(KAFKA_BROKER_ADDRESS, conf) |
Given example does not work, receives a Type related error.
consumer side, there’s no message received. Tried to send message with the same size several time (with 20MB, 15MB, 1MB even 1KB) after sending 2 – sometimes 3 – messages, the terminal crashed.
ran it, 2 times in a row, after the 2nd one, producer output:
Consumer output:
no matter what the message size is, after sending it 2-3 times we get an error. Some of the behavior looks like issue #11, so we modified our code to create the producer only once per running session, but still we get exceptions. Thanks, |
librdkafka should be thread-safe by itself, but we may corrupt memory e.g. while destroying the allocated resources. Can you post a minimal reproducible example (the producer side should be enough)? It's hard to see what may go wrong without the actual code. |
producer code :
|
I cannot reproduce the crash with a freshly installed RDKafka.jl on Linux. Messages of size > 1Mb indeed are not delivered, but it might be related to other settings (e.g. see this question), so I haven't looked at it yet. Could you please verify what exactly fails for you - sending several messages (even of a small size) in a row, or sending large messages? Also, is it correct that you get the access violation error after the producer has finished its job (the message "Producer Done!" is printed by this time)? |
What fails to us is sending several messages in row, usually when the messages are equal to or above 1Mb size. |
If you continue sending messages endlessly (so producer is never "done"), do you see the same error? |
Yes,
the output was:
|
another output:
in there's no message received in the consumer side. |
Does the script work fine with messages less than 1Mb? Large messages may be blocked by many settings on both - client and server side, so one direction to go is to inspect the settings thoroughly. On the other hand, if you see the same error with smaller messages, or smaller messages are not delivered to the consumer, the problem might be in the Windows vs Linux version of librdkafka, because on Linux I cannot reproduce the described behavior. |
Hi,
I’m trying to send different sizes message from my producer – with changing the default configuration of max message bytes – till the 1MB message, all sent, and then got error;
When sending messages of 1MB or greater I keep getting an Unknown Error (code: -1) that appears to come from the RDKafka Dll used by the RDKafka.jl package. it reproduces all of the time.
This type and size of messages work with the same Kafka cluster and other non-Julia clients, so it looks like an issue coming from the RDKafka.jl package.
Producer code:
Producer output:
Consumer code:
Consumer output:
Thanks,
Enal.
The text was updated successfully, but these errors were encountered: