Kafka client interceptors
Is their plan to implement Kafka client interceptors like the java client has for python and go?
There is ongoing work to add interceptor support to librdkafka (the underlying Kafka client implementation used by the Python, Go and .NET clients). The interceptors themselves will need to be implemented as standalone shared libraries written in C that are dynamically loaded based on configuration path.
Can you describe your use-case for interceptors?
My use case is we sometimes get a large message, which is greater the max message size we configure in Kafka (producer, broker, consumer), and we don't want increase the max message size all over the place, and some of our large messages are in the range of 50MB-100MB, it would be impractical to increase the max message size to such a huge size in Kafka. So we would like to use interceptors to upload to s3 at the producer level and download from s3 at the consumer level. I am open to any suggestions to solve this problem, does by any librdkafka splits the large message like linked in does?
When do you think it will be released in librdkafka? do u know when confluent clients will get it?
@cpuchakayaka For this use case you don't really need interceptors. In fact, in Python interceptors generally aren't as useful for the same reason the base producer/consumer don't need pluggable serializers/deserializers -- you can just subclass them and override the behavior of the send()/poll() methods to make the modifications to the data.
I don't think interceptors would solve this particular problem anyway since they operate 1:1 -- one message in, one message out.
The interceptors that will be added to librdkafka will not support modifying the message itself, thus a read-only interceptor, so they won't really be useful for your use-case anyway.
Thanks for the info.
I see that interceptor plugin support has been added to librdkafka. Any idea when that will be brought forward to the kafka client? We're looking to implement confluent metrics and monitoring.
Our aim is to release Confluent monitoring-interceptors for librdkafka-based clients soon.