Fix KafkaEmbedded sample in Docs

This commit is contained in:
bistros
2018-01-11 00:25:01 +09:00
committed by Artem Bilan
parent 51c84c4b82
commit f7cabcafb4

View File

@@ -117,11 +117,11 @@ For convenience a test class level `@EmbeddedKafka` annotation is provided with
public class KafkaStreamsTests {
@Autowired
private KafkaEmbedded kafkaEmbedded;
private KafkaEmbedded embeddedKafka;
@Test
public void someTest() {
Map<String, Object> consumerProps = KafkaTestUtils.consumerProps("testGroup", "true", this.kafkaEmbedded);
Map<String, Object> consumerProps = KafkaTestUtils.consumerProps("testGroup", "true", this.embeddedKafka);
consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
ConsumerFactory<Integer, String> cf = new DefaultKafkaConsumerFactory<>(consumerProps);
Consumer<Integer, String> consumer = cf.createConsumer();