Class TestingKafka

java.lang.Object
io.trino.testing.kafka.TestingKafka
All Implemented Interfaces:
Closeable, AutoCloseable

public final class TestingKafka extends Object implements Closeable
  • Method Details

    • 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:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      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()