Comments (3)
You will need to set a dr_cb (delivery report callback) and then call rd_kafka_poll() to get indication if a message was delivered or not.
Use rd_kafka_conf_set_dr_cb(), you can look at examples/rdkafka_performance.c for an example.
Even if you dont set a dr_cb, librdkafka will respect your request.required.acks setting and make sure the message does indeed receive the requested number of acks, or else it will retry the transmission.
from librdkafka.
I'm pretty sure poll never returns 1 though if no callback is specified
which surprised me
On Friday, December 27, 2013, Magnus Edenhill wrote:
You will need to set a dr_cb (delivery report callback) and then call
rd_kafka_poll() to get indication if a message was delivered or not.Use rd_kafka_conf_set_dr_cb(), you can look at
examples/rdkafka_performance.c for an example.Even if you dont set a dr_cb, librdkafka will respect your
request.required.acks setting and make sure the message does indeed receive
the requested number of acks, or else it will retry the transmission.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-31282919
.
from librdkafka.
rd_kafka_poll() simply returns the number of internal events served, and not all of them depend on the application having configured a callback.
For instance if no error callback is configured the errors are converted into log messages instead.
So you shouldn't use the return value of rd_kafka_poll() to indicate any sort of produce message success, you need the delivery report callback (dr_cb) for that.
from librdkafka.
Related Issues (20)
- adminClient describeConsumerGroups leads to python: rdkafka_queue.h:1052: rd_kafka_enq_once_del_source_return: Assertion `eonce->refcnt > 0' failed. HOT 2
- Producer never reconnects to broker HOT 3
- ListOffsets loop of failed requests on leader epoch change until timeout happens HOT 3
- Question: Can event_cb be called on a stopped producer/consumer? HOT 1
- Data race in `rd_kafka_broker_timeout_scan`
- rd_kafka_produceva: double free headers on message sending error HOT 2
- coop sticky algo on large partition number HOT 1
- Duplicate messages could be received when resuming partitions that weren't paused
- Some components use `strcmp` which is vulnerable to timing attacks
- Timeout overflows when over 2047.48
- Crash in rd_kafka_broker_add_logical HOT 1
- Reading committed offsets where metadata contains null byte leads to reading random data after null byte.
- zlib library security vulnerability through to version 1.3
- when using librdkafka, create a thread will fail.
- Unable to connect C++ consumer client with OAUTHBEARER mechanism to server HOT 1
- query_watermark_offsets() Doesn't Return Authentication Failure Errors.
- Critical Vulnerabilities identified in librdkafka HOT 3
- Pr 1
- Sporadic crash in rd_kafka_buf_callback()
- Starting with 8e20e1ee, after broker goes down and back up, `rd_kafka_destroy` of groupconsumer hangs HOT 7
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.