Open gphilipp opened 8 months ago
While the team works on support for running the Confluent CLI in parallel, my recommendation would be to use a separate configuration file for each thread running stateful Confluent CLI commands. You can change the path of the configuration file by prefixing commands with HOME=<tmpdir>
, so each configuration file will live at a different <tmpdir>/.confluent/config.json
.
I have this shell script which uses the Confluent CLI to delete all subjects in a concurrent fashion:
It works most of the time, but I sometimes get these error messages:
What is probably happening is that another process reads the config.json file in the middle of the config write operation. It would be best to write the
config.json
changes in a temporary file and then renaming it, which is an atomic operation at the OS level.