-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into AI-2904/kafka-consumer-revamp
- Loading branch information
Showing
5 changed files
with
36 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Kafka Consumer integration Dev Setup | ||
|
||
## Install `librdkafka` | ||
|
||
The kafka-consumer integration leverages the [confluent-kafka](https://github.com/confluentinc/confluent-kafka-python) library. To support Kerberos authentication, this library needs to be built from source, more info can be found [here](https://github.com/confluentinc/confluent-kafka-python#install). | ||
|
||
To be able to build the test environments and run the tests, you'll need to manually install `librdkafka` on your host. On MacOS, simply run: | ||
|
||
```commandline | ||
brew install librdkafka | ||
``` | ||
|
||
For other systems, you can follow the instructions [here](https://github.com/confluentinc/confluent-kafka-python/blob/master/INSTALL.md#install-from-source). | ||
|
||
Once done, you can run `ddev test kafka_consumer`, the `confluent-kafka` will be built from source. | ||
|
||
## Troubleshooting | ||
|
||
### fatal error: 'librdkafka/rdkafka.h' file not found | ||
|
||
If you face this issue: | ||
|
||
```commandline | ||
/private/var/folders/hq/d80ndr2x68g21s07h1nww6qw0000gp/T/pip-install-1v8fm2o0/confluent-kafka_f0f65a0360e648168d1dbcd50ec93912/src/confluent_kafka/src/confluent_kafka.h:23:10: fatal error: 'librdkafka/rdkafka.h' file not found | ||
#include <librdkafka/rdkafka.h> | ||
^~~~~~~~~~~~~~~~~~~~~~ | ||
``` | ||
|
||
1. Make sure you installed `librdkafka` (see the previous section). | ||
2. You might need to set the `C_INCLUDE_PATH` and `LIBRARY_PATH` environments variable to load `librdkafka` when bulding `confluent-kafka`. For instance: `C_INCLUDE_PATH=/opt/homebrew/Cellar/librdkafka/2.0.2/include/ LIBRARY_PATH=/opt/homebrew/Cellar/librdkafka/2.0.2/lib ddev test kafka_consumer`. Setting these environment variables is only needed when the test environment is built (or rebuilt with the `--force-env-rebuild` option). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters