Typically librdkafka hides any non-permanent errors from the application and handles them gracefully internally by retrying.
Permanent errors are handled in different ways:
error_cb
callback, you need to call rd_kafka_poll()
regularly to receive them (e.g. RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN
).dr_cb
/dr_msg_cb
callback, you need to call rd_kafka_poll()
regularly to receive themRD_KAFKA_RESP_ERR__PARTITION_EOF
) or more serious errors are passed as rkmessage->err
for the .._consume*()
functions that return or pass an rd_kafka_message_t
.This means that a producer application should be calling rd_kafka_poll()
every now and then, and a consumer application should both consume messages and call rd_kafka_poll()
every now and then.
If using the new high-level KafkaConsumer an application should call rd_kafka_poll_set_consumer()
after creating the CONSUMER instance to automatically redirect all events to the single rd_kafka_consumer_poll()
queue endpoint. You still need to use an error callback in this case to get global errors.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4