Package org.springframework.kafka.test
Class EmbeddedKafkaBrokerFactory
java.lang.Object
org.springframework.kafka.test.EmbeddedKafkaBrokerFactory
The factory to encapsulate an
EmbeddedKafkaBroker
creation logic.- Since:
- 3.2.6
- Author:
- Artem Bilan
-
Method Summary
Modifier and TypeMethodDescriptionstatic EmbeddedKafkaBroker
create
(EmbeddedKafka embeddedKafka) Create anEmbeddedKafkaBroker
based on theEmbeddedKafka
annotation.static EmbeddedKafkaBroker
create
(EmbeddedKafka embeddedKafka, Function<String, String> propertyResolver) Create anEmbeddedKafkaBroker
based on theEmbeddedKafka
annotation.
-
Method Details
-
create
Create anEmbeddedKafkaBroker
based on theEmbeddedKafka
annotation.- Parameters:
embeddedKafka
- theEmbeddedKafka
annotation.- Returns:
- a new
EmbeddedKafkaBroker
instance.
-
create
public static EmbeddedKafkaBroker create(EmbeddedKafka embeddedKafka, Function<String, String> propertyResolver) Create anEmbeddedKafkaBroker
based on theEmbeddedKafka
annotation.- Parameters:
embeddedKafka
- theEmbeddedKafka
annotation.propertyResolver
- theFunction
for placeholders in the annotation attributes.- Returns:
- a new
EmbeddedKafkaBroker
instance.
-