Code Monkey home page Code Monkey logo

kroxylicious's Introduction

kproxy

kproxy is an exploration for building a Kafka protocol proxy, addressing use cases such as multi-tenancy, schema validation, or encryption.

Build

Java, version 11 or newer, and Apache Maven are required for building this project. Build the project like this:

$ mvn clean install

The running of the tests can be controlled with the following Maven properties:

property description
-DskipUTs=true skip unit tests
-DskipITs=true skip integration tests
-DskipTests=true skip all tests

The kafka environment used by the integrations tests can be defaulted with these two environment variables.

env var default description
TEST_CLUSTER_EXECUTION_MODE IN_VM IN_VM or CONTAINER. if IN_VM, kafka will be run same virtual machines as the integration test. Otherwise containers will be used.
TEST_CLUSTER_KRAFT_MODE true if true, kafka will be run in kraft mode.

When the integration-tests are run in CONTAINER mode, the kafka/zookeeper logs are written to a location specified by the container.logs.dir system property. When run through Maven this is defaulted to integrationtests/target/container-logs.

Pass the -Dquick option to skip all tests and non-essential plug-ins and create the output artifact as quickly as possible:

$ mvn clean verify -Dquick

Run the following command to format the source code and organize the imports as per the project's conventions:

$ mvn process-sources

Build with the dist profile for creating an executable JAR:

$ mvn clean verify -Pdist -Dquick

Run the following to add missing license headers e.g. when adding new source files:

$ mvn org.commonjava.maven.plugins:directory-maven-plugin:highest-basedir@resolve-rootdir license:format

Run

Build with the dist profile as shown above, then execute this:

$ java -jar kroxylicious/target/kroxylicious-1.0-SNAPSHOT.jar -cp {path-to-your-class-path}

To prevent the following error:

Failed to load class org.slf4j.impl.StaticLoggerBinder

Make sure to follow the suggestions here to include one (and only one) of the suggested jars on the classpath.

Performance Testing

See benchmarking.md for information on running basic performance tests for this proxy.

Architecture Monitoring

This project uses Deptective ๐Ÿ•ต for monitoring its architecture and fails any violations, either in form of unwanted package dependencies or circular package dependencies. The target dependency model is configured in the deptective.json file. Any new package relationships need to be registered there.

To verify whether the code base adheres to that target model, run the following:

$ mvn clean verify -Dquick -Parchitecture-check -pl kroxylicious

In case of any architecture violations, the actual architecture can be visualized using GraphViz like so:

$ dot -Tpng kroxylicious/target/generated-sources/annotations/deptective.dot > kroxylicious-arch.png

License

This code base is available under the Apache License, version 2.

kroxylicious's People

Contributors

gunnarmorling avatar tombentley avatar k-wall avatar franz1981 avatar sambarker avatar robobario avatar franvila avatar racheljpg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.