Package com.networknt.tram.test
Interface KafkaTestEnvironment
-
- All Known Implementing Classes:
KafkaTestEnvironmentImpl
public interface KafkaTestEnvironmentAbstract class providing a Kafka test environment.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classKafkaTestEnvironment.Configstatic interfaceKafkaTestEnvironment.KafkaOffsetHandlerSimple interface to commit and retrieve offsets.
-
Field Summary
Fields Modifier and Type Field Description static StringKAFKA_HOST
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static KafkaTestEnvironment.ConfigcreateConfig()KafkaTestEnvironment.KafkaOffsetHandlercreateOffsetHandler()voidcreateTestTopic(String topic, int numberOfPartitions, short replicationFactor)voidcreateTestTopic(String topic, int numberOfPartitions, short replicationFactor, Properties properties)voiddeleteTestTopic(String topic)<K,V>
Collection<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>getAllRecordsFromTopic(Properties properties, String topic, int partition, long timeout)StringgetBrokerConnectionString()intgetBrokerId(kafka.server.KafkaServer server)List<kafka.server.KafkaServer>getBrokers()intgetLeaderToShutDown(String topic)PropertiesgetSecureProperties()PropertiesgetStandardProperties()StringgetVersion()booleanisSecureRunSupported()voidprepare(KafkaTestEnvironment.Config config)voidrestartBroker(int leaderId)voidshutdown()
-
-
-
Field Detail
-
KAFKA_HOST
static final String KAFKA_HOST
- See Also:
- Constant Field Values
-
-
Method Detail
-
createConfig
static KafkaTestEnvironment.Config createConfig()
-
prepare
void prepare(KafkaTestEnvironment.Config config)
-
shutdown
void shutdown()
-
deleteTestTopic
void deleteTestTopic(String topic)
-
createTestTopic
void createTestTopic(String topic, int numberOfPartitions, short replicationFactor, Properties properties)
-
createTestTopic
void createTestTopic(String topic, int numberOfPartitions, short replicationFactor)
-
getStandardProperties
Properties getStandardProperties()
-
getSecureProperties
Properties getSecureProperties()
-
getBrokerConnectionString
String getBrokerConnectionString()
-
getVersion
String getVersion()
-
getBrokers
List<kafka.server.KafkaServer> getBrokers()
-
getAllRecordsFromTopic
<K,V> Collection<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>> getAllRecordsFromTopic(Properties properties, String topic, int partition, long timeout)
-
createOffsetHandler
KafkaTestEnvironment.KafkaOffsetHandler createOffsetHandler()
-
getBrokerId
int getBrokerId(kafka.server.KafkaServer server)
-
isSecureRunSupported
boolean isSecureRunSupported()
-
-