Coding guidelines

These guidelines are meant to encourage consistency and best practices amongst people working on the Kafka® code base. They should be observed unless there is a compelling reason to ignore them.

Basic Stuff

Scala

We are following the style guide given here (though not perfectly). Below are some specifics worth noting:

Logging

Monitoring

Unit Tests

Configuration

Concurrency

Backwards Compatibility

Client Code

There are a few things that need to be considered in client code that are not a major concern on the server side.

Streams API

Kafka's Streams API (aka Kafka Streams) uses a few more additional coding guidelines. All contributors should follow these the get a high quality and uniform code base. Some rules help to simplify PR reviews and thus make the life of all contributors easier.