Skip to content

Automatic topic creation in Kafka #751

@jamesforwardnwboxed

Description

@jamesforwardnwboxed

Feature description

Hi,

I'm trying to use micronaut test resources, and have managed to spin up a Kafka Container and have it connect into my application. However, my logs are spamming errors that the topics I want are created. With a normal TestContainers approach, I would just create beans or something that would take a list of topic names and create them.

There is almost no documentation here about configuration, so if this feature is already available it isn't very clear: https://micronaut-projects.github.io/micronaut-test-resources/latest/guide/#modules-kafka

What would be good is if it were possible to configure the Test Resources to configure the Kafka broker, ie:

test-resources:
  containers:
    kafka:
      topics:
        - my-topic-one
        - my-topic-two
      partitions: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: improvementA minor improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions