0

I'm using testcontainers kafka image which is confluent cp-kafka, I need to amend kafka config using command:

./kafka-configs.sh --alter --entity-name <TOPIC_NAME> --entity-type topics --add-config message.timestamp.type=LogAppendTime --zookeeper <HOST>:<PORT>

I have an issue exucuting this command using KafkaContainer::execInContainer which yields no such file or directory.

I've looked at github image and confluent installation on ubuntu where it should be located, and tried various options with no success.

How to properly do this ?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
marknorkin
  • 3,904
  • 10
  • 46
  • 82

1 Answers1

0

./kafka-configs.sh assumes that kafka-configs.sh is available in a current directory, which might not be the case (try running cwd or ls -la instead and check the output).

But if you remove ./ before kafka-configs.sh, it should use the command from the PATH variable, which is supposed to be configured inside the Kafka image.

bsideup
  • 2,845
  • 17
  • 21