Consume Messages With Spring Cloud Stream Kafka

Update:

Spring Cloud Stream is a very complex topic and a remarkable piece of technology. It builds on other intricate Spring technologies like Spring Integration and Spring Cloud Function, and when you add Apache Kafka to the mix, you have a steep learning curve on your hands.

There is a lot of documentation to read and comprehend, and I do not think it helps that your first interaction with the technology is by showing off. Here is the sample in the “Introducing Spring Cloud Stream” section.

@SpringBootApplication
public class SampleApplication {
    public static void main(String[] args) {
        SpringApplication.run(SampleApplication.class, args);
    }
    @Bean
    public Function<String, String> uppercase() {
        return value -> value.toUpperCase();
    }
}

That supposedly is a fully functioning application. The uppercase() method consumes and produces simultaneously, essentially turning it into a way software can pleasure itself. To understand this example, you must know about all the Spring Boot auto-configuration magic happening in the background. Otherwise, it is an opaque magical, and indecipherable showpiece.

This post will show a practical example of a simple consumer application receiving messages from a Kafka cluster. This was my use case, and while the documentation contains a ton of helpful information, it only succeeded in confusing me at first, coming to the technology with fresh eyes. As a result, it took me a long time to put together all the pieces before I understood what was going on.

Read More »

My Year in Gaming 2022 – Game of the Year and Others

Last year, I wrote a summary of all the games I played in 2021. It was one of the ways of coping with the stress I deal with at work. And I like games. And writing. And writing about games. And digressing.

Two does not yet make for a series, but I’d like to continue the idea, and maybe I can turn it into one. So, here is my gaming year 2022 in review. I am not yet confident that I have nailed the format, so this blog post will differ in style from the inaugural version. I will start with a bit of story mode, as I am wont to do. Afterward, I’ll present the games in the order I started (or finished?) them. We’ll see. Lastly, I’ll reveal my Game of the Year in 2022.

AND DON’T YOU DARE JUMP AHEAD WITHOUT READING THE REST!

Read More »