-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Labels
Description
In what version(s) of Spring for Apache Kafka are you seeing this issue?
Spring-Kafka: 3.2.4
Spring-Boot: 3.3.4
Describe the bug
Because of the upgrade from older Spring-Kafka versions, we need to use EmbeddedKafkaZKBroker.
In doing so, @Autowired does not support EmbeddedKafkaZKBroker and yields the error: "Cannot find symbol" for getBrokerAddress().
The current fix is to instantiate EmbeddedKafkaZKBroker object.
This fix doesn't truly work. It allows the app to compile but it fails at runtime.
To Reproduce
Try to autowire the broker.
@Autowired
private EmbeddedKafkaZKBroker kafkaBroker;
// Remainder of codeError will say:
[ERROR] <path> cannot find symbol
[ERROR] symbol: getBrokerAdress(int)
Expected behavior
Upgrading from EmbededKafkaBroker to EmbeddedKafkaZKBroker should be a drop in replacement.
Sample
This is what the current work around looks like
private EmbeddedKafkaZKBroker kafkaBroker = new EmbeddedKafkaZKBroker(10);