Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.64 KB

redpanda.md

File metadata and controls

44 lines (33 loc) · 1.64 KB

Redpanda

Testcontainers can be used to automatically instantiate and manage Redpanda containers. More precisely Testcontainers uses the official Docker images for Redpanda

!!! note This module uses features provided in docker.redpanda.com/vectorized/redpanda.

Example

Create a Redpanda to use it in your tests:

Creating a Redpanda inside_block:constructorWithVersion

Now your tests or any other process running on your machine can get access to running Redpanda broker by using the following bootstrap server location:

Bootstrap Servers inside_block:getBootstrapServers

Redpanda also provides a schema registry implementation. Like the Redpanda broker, you can access by using the following schema registry location:

Schema Registry inside_block:getSchemaRegistryAddress

Adding this module to your project dependencies

Add the following dependency to your pom.xml/build.gradle file:

=== "Gradle"

testImplementation "org.testcontainers:redpanda:{{latest_version}}"

=== "Maven"

<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>redpanda</artifactId>
    <version>{{latest_version}}</version>
    <scope>test</scope>
</dependency>