Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

[FEATURE] Create a Kafka Test Container based upon KoP #1780

Open
david-streamlio opened this issue Mar 29, 2023 · 1 comment
Open

[FEATURE] Create a Kafka Test Container based upon KoP #1780

david-streamlio opened this issue Mar 29, 2023 · 1 comment
Labels
type/feature Indicates new functionality

Comments

@david-streamlio
Copy link

Is your feature request related to a problem? Please describe.
Customers who are using the Quarkus development framework to develop Kafka applications use a Kafka Test Container from the Test Containers project for all of their unit and integration tests.

Customers would rather test against a KoP test container than a pure Kafka one as it would be closer to what their production environment would be.

Describe the solution you'd like
I would like it if we could use a different Docker image inside the existing KafkaTest container instead of the Confluent one, e.g.

KafkaContainer kafka = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:6.2.1"))

This would allow customers to swap out the confluent image for our KoP image and minimize the code changes required for migrating to KoP.

Describe alternatives you've considered
None

Additional context
I think such a container can be easily developed from the existing streamnative/sn-pulsar docker image that already contains the KoP protocol handler. We just need to add some configuration properties to enable it, e.g.,

`FROM streamnative/sn-pulsar:2.10.3.6

RUN echo "messagingProtocols=kafka" >> /pulsar/conf/standalone.conf &&
echo "protocolHandlerDirectory=./protocols" >> /pulsar/conf/standalone.conf &&
echo "allowAutoTopicCreationType=partitioned" >> /pulsar/conf/standalone.conf &&
echo "kafkaListeners=kafka_internal://0.0.0.0:9092" >> /pulsar/conf/standalone.conf &&
echo "kafkaProtocolMap=kafka_internal:PLAINTEXT" >> /pulsar/conf/standalone.conf &&
echo "kafkaAdvertisedListeners=kafka_internal://localhost:9092" >> /pulsar/conf/standalone.conf &&
echo "brokerEntryMetadataInterceptors=org.apache.pulsar.common.intercept.AppendIndexMetadataInterceptor" >> /pulsar/conf/standalone.conf &&
echo "brokerDeleteInactiveTopicsEnabled=false" >> /pulsar/conf/standalone.conf`

@david-streamlio david-streamlio added the type/feature Indicates new functionality label Mar 29, 2023
@BewareMyPower
Copy link
Collaborator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Indicates new functionality
Projects
None yet
Development

No branches or pull requests

2 participants