Comments (7)
Hi Andre,
what version/branch is this? 0.7 or 0.8/master?
from librdkafka.
How many rd_kafka_t objects are you creating, with how many topics, and how many brokers are available in the cluster?
Also; are you creating and destroy multiple rd_kafka_t objects? (i.e., shortlived)
from librdkafka.
Hi Magnus,
I'm using version 0.8/master.
I create a rd_kafka_t per reques:
rd_kafka_t *rk = rd_kafka_new(RD_KAFKA_PRODUCER, &conf,
errstr, sizeof(errstr));
than send the msg and wait:
rd_kafka_topic_t *rkt = rd_kafka_topic_new(rk, topic, &topic_conf);
rd_kafka_produce(rkt, partition,
RD_KAFKA_MSG_F_FREE, msg, strlen(msg),
"nginx", 5,
NULL);
rd_kafka_poll(rk, 0);
and finally:
rd_kafka_destroy(rk);
Thanks!
from librdkafka.
Thanks for clarifying your setup.
My guess is that the broker threads created by rdkafka arent properly terminated on rd_kafka_destroy() and that is clearly a bug that I will look into.
If possible I suggest that you try to hang on to the rd_kafka_t object and reuse it in subsequent rd_kafka_produce() calls to amortize the startup cost of connecting to the broker(s) and fetching metadata for each produced message. Not only will it avoid the above bug but it will provide a far more performant and resource frugal setup.
Would that be possible in your case?
from librdkafka.
I'm working on a fix, should be available end of this week.
from librdkafka.
Andre, could you please pull the latest master and give it another go?
This issue should now be fixed and it would be great if you could verify it in your setup.
Reopen this issue if the problem remains.
from librdkafka.
Hi,
the problem is gone with the fix.
thanks!
from librdkafka.
Related Issues (20)
- Fail to recover a partition which was temporarily delegated to the internal broker HOT 1
- ThreadSanitizer: data race + hang in rd_kafka_destroy (or rd_kafka_destroy_flags) HOT 1
- How to create a librdkafka.so file?
- Incorrect version of zlib packaged with windows version
- X
- can not be used when making a shared object; recompile with -fPIC
- When I was to send the message to kafka's service, the message content was lost when I have found it by kafkatool
- compile issue with "Use STATIC_LIB_libzstd=/path/to/libzstd.a "
- After the connection with the broker times out, there is no reconnection HOT 2
- Topic {X} partition count changed from {Y} to {Z} - for already deleted topic
- Some partitions occasionally fail to be consumed when a single client consumes multiple partitions. HOT 1
- timeout issue with async commit , we want to commit every message after consuming HOT 3
- librdkafka 2.2.0 uses system to run kinit and hence can receive SIGCHLD
- Error "Disconnected while requesting ApiVersion: might be caused by incorrect security.protocol configuration..." connecting to kafka broker 3.8.0 HOT 4
- Assert failing when none of KIP 714 requested metrics are implemented by librdkafka HOT 1
- warning: 'ENGINE_free' is deprecated: Since OpenSSL 3.0
- Why consumers do not report errors if the topic is deleted
- Unable to use sasl_ssl with Python client HOT 2
- Resource type TransactionalId is not implemented in ACLs
- How to properly reconsume messages after their processing failed in High-Level balanced consumer?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from librdkafka.