IP
Problems can be avoided by making these hidden connections between code visible using comments. While the statement is correct it highlights a problem that I think it requires more attention. What you call "hidden connections" can be described as "cognitive load" and in this case, the need of having to add a comment to make it "safer" signals that the interface has not been properly designed (the Kafka interface that exposes those keys to be modified). Comments are our last line of defence against poorly defined dependency interfaces.