a93482b7ef
* Adding OpenSSL engine support in LibrdKafka for SSL connections * Adding OpenSSL engine support in LibrdKafka for SSL connections * clean up of keys on failure conditions, add entry in configuration.md, also add ca_cert options in the example * add the condition OPENSSL_VERSION_NUMBER >= 0x10100000 for the engine code. Call to ENGINE_load_ssl_client_cert takes ca certs which are to be taken from the current SSL_CTX. How to read all the ca certs SSL_CTX is different in before and OpenSSL 1.1.0 onwards, hence putting the condition. If people suggest we can have both the pieces of code and depending on OpsnSSL version execution will be determined. * remove unwanted changes in vcxproj files * Add new lines in tests and librdkafkacpp vcxproj files * improve spacing * fix build break in openssl_engine_example.vcxproj * attach * and & with var instead of type * resolve more spacing comments, and fix build breaks * add openssl_engine_example to makefile, make callback_data to non-const * resolve build error for cpp-11 * add headers in openssl_engine_example.cpp * free pkey and x509 on error and improve comment section * Adding OpenSSL engine support in LibrdKafka for SSL connections * Adding OpenSSL engine support in LibrdKafka for SSL connections * clean up of keys on failure conditions, add entry in configuration.md, also add ca_cert options in the example * add the condition OPENSSL_VERSION_NUMBER >= 0x10100000 for the engine code. Call to ENGINE_load_ssl_client_cert takes ca certs which are to be taken from the current SSL_CTX. How to read all the ca certs SSL_CTX is different in before and OpenSSL 1.1.0 onwards, hence putting the condition. If people suggest we can have both the pieces of code and depending on OpsnSSL version execution will be determined. * improve spacing * fix build break in openssl_engine_example.vcxproj * attach * and & with var instead of type * resolve more spacing comments, and fix build breaks * add openssl_engine_example to makefile, make callback_data to non-const * resolve build error for cpp-11 * add headers in openssl_engine_example.cpp * free pkey and x509 on error and improve comment section * add negative unit test and fix documentation comments * resole build break * add '/' in examples makefile to fix build * fix spacing issues * remove with_ssl check for engine since build breaks. * put back openssl version check in rdkafka_conf.c * simplify openssl_engine_example.cpp and fix comments * fix 0124-openssl_invalid_engine to run without broker and openssl. fix some comments * fix the test 0124-openssl_invalid_engine.c without ssl execution * destroy conf in 0124-openssl_invalid_engine.c * add rd_kafka_conf_destroy in success case in 0124-openssl_invalid_engine.c * fix engine initialization error reporting * fix spacing in engine initialization * Fix spacing Co-authored-by: Aditya Nigam <adinigam@microsoft.com> Co-authored-by: Ajay Barboza <ajbarb@microsoft.com> |
||
---|---|---|
.. | ||
.gitignore | ||
CMakeLists.txt | ||
Makefile | ||
README.md | ||
consumer.c | ||
delete_records.c | ||
globals.json | ||
idempotent_producer.c | ||
kafkatest_verifiable_client.cpp | ||
openssl_engine_example.cpp | ||
producer.c | ||
producer.cpp | ||
rdkafka_complex_consumer_example.c | ||
rdkafka_complex_consumer_example.cpp | ||
rdkafka_consume_batch.cpp | ||
rdkafka_example.c | ||
rdkafka_example.cpp | ||
rdkafka_performance.c | ||
rdkafka_zookeeper_example.c | ||
transactions-older-broker.c | ||
transactions.c | ||
win_ssl_cert_store.cpp |
README.md
librdkafka examples
This directory contains example applications utilizing librdkafka.
The examples are built by running make
and they will be be linked
statically or dynamically to librdkafka in the parent ../src
directory.
Begin with the following examples:
- consumer.c - a typical C high-level consumer application.
- producer.c - a typical C producer application.
- producer.cpp - a typical C++ producer application.
- idempotent_producer.c - Idempotent producer.
- transactions.c - Full exactly once semantics (EOS) transactional consumer-producer exammple. Requires Apache Kafka 2.5 or later.
- transactions-older-broker.c - Same as
transactions.c
but for Apache Kafka versions 2.4.x and older which lack KIP-447 support.
For more complex uses, see:
- rdkafka_example.c - simple consumer, producer, metadata listing, kitchen sink, etc.
- rdkafka_example.cpp - simple consumer, producer, metadata listing in C++.
- rdkafka_complex_consumer_example.c - a more contrived high-level C consumer example.
- rdkafka_complex_consumer_example.cpp - a more contrived high-level C++ consumer example.
- rdkafka_consume_batch.cpp - batching high-level C++ consumer example.
- rdkafka_performance.c - performance, benchmark, latency producer and consumer tool.
- kafkatest_verifiable_client.cpp - for use with the official Apache Kafka client system tests.
- openssl_engine_example.cpp - metadata listing in C++ over SSL channel established using OpenSSL engine.