Posts

  • A Polling Java Future

    There are times in Java, when we want to act on a state transition in some object. Ideally, the object allows us to register a listener, which is called when the state changes. Unfortunately, this is not always the case, especially when the class stems from a third-party library and is outside our control. In this case, we need to poll the state regularly, to detect the change we are interested in and then invoke the callback we want. The Java concurrency library offers a neat abstraction with the CompletableFuture. In this post we try to wrap the polling into such a future, that can be used by a wide variety of frameworks, especially for reactive programming.

  • Kafka Streams Suppress Feature

    Kafka Streams is a Java streaming framework, that tightly integrates with Apache Kafka. In contrast to Apache Spark of Apache Flink it does not require a separate cluster runtime. Instead it consists of a Java library to be fully integrated into any Java application. In that way it can augment the capabilities of that application by adding stream processing of Kafka topics. The suppression feature allows for fine-grained control of the message frequency when using aggregations. For a full feature description of Kafka Streams check out the documentation on the Apache project page or from Confluent.

subscribe via RSS