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

The Krux Kafka Client library as a simple wrapper for the Kafka-provided client libraries, both producers and consumers

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.txt
Notifications You must be signed in to change notification settings

krux/java-kafka-client-libs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

THIS REPOSITORY IS NO LONGER MAINTAINED AND ARCHIVED.

Krux Kafka Client Library

The Krux Kafka Client library as a simple wrapper for the Kafka-provided client libraries, both producers and consumers, that's built atop the Krux Standard Library and automatically emits tons of useful usage statistics (such as messages processed rates and processing time histograms) on a per-topic basis. It also provides a pattern for configuring multiple topics to be handled by a single, thread-safe consumer, a common pattern at Krux.

Using

To use, add the following dependency to your pom.xml:

<dependency>
  <groupId>com.krux</groupId>
  <artifactId>kafka-client-libs</artifactId>
  <version>1.6.9</version>
</dependency>

Simple Use

/* Krux' Kafka consumer client handles threads, stats, status for you */

/* first, implement the MessageHandler interface */
public interface MessageHandler<T extends Object> {
    public void onMessage( T message );
}
/* Then instantiate, pass to Krux' Kafka Consumer, .start() */
final MessageHandler<Object> myHandler = new MySimpleHandler<Object>();
KafkaConsumer consumer = new KafkaConsumer( options, myHandler );

//handles message consumption in a non-daemon thread
consumer.start();

More Advanced Use

See example consumer and producer applications.

About

The Krux Kafka Client library as a simple wrapper for the Kafka-provided client libraries, both producers and consumers

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.txt

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages