Package io.trino.testing.kafka
Class TestingKafka
- java.lang.Object
-
- io.trino.testing.kafka.TestingKafka
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class TestingKafka extends Object implements Closeable
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static TestingKafkacreate()static TestingKafkacreate(String confluentPlatformVersions)voidcreateTopic(String topic)voidcreateTopicWithConfig(int partitions, int replication, String topic, boolean enableLogAppendTime)static TestingKafkacreateWithSchemaRegistry()StringgetConnectString()org.testcontainers.containers.NetworkgetNetwork()StringgetSchemaRegistryConnectString()<K,V>
org.apache.kafka.clients.producer.RecordMetadatasendMessages(Stream<org.apache.kafka.clients.producer.ProducerRecord<K,V>> recordStream)<K,V>
org.apache.kafka.clients.producer.RecordMetadatasendMessages(Stream<org.apache.kafka.clients.producer.ProducerRecord<K,V>> recordStream, Map<String,String> extraProducerProperties)voidstart()
-
-
-
Method Detail
-
create
public static TestingKafka create()
-
create
public static TestingKafka create(String confluentPlatformVersions)
-
createWithSchemaRegistry
public static TestingKafka createWithSchemaRegistry()
-
start
public void start()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
createTopic
public void createTopic(String topic)
-
createTopicWithConfig
public void createTopicWithConfig(int partitions, int replication, String topic, boolean enableLogAppendTime)
-
sendMessages
public <K,V> org.apache.kafka.clients.producer.RecordMetadata sendMessages(Stream<org.apache.kafka.clients.producer.ProducerRecord<K,V>> recordStream)
-
sendMessages
public <K,V> org.apache.kafka.clients.producer.RecordMetadata sendMessages(Stream<org.apache.kafka.clients.producer.ProducerRecord<K,V>> recordStream, Map<String,String> extraProducerProperties)
-
getConnectString
public String getConnectString()
-
getSchemaRegistryConnectString
public String getSchemaRegistryConnectString()
-
getNetwork
public org.testcontainers.containers.Network getNetwork()
-
-