Self Hosted Java Cloud

When starting a new project from scratch it is convenient to have an environment where future project will be deployed at. I don’t pretend on giving the standard solution for desired purposes, but approaches described in this article seemed very useful to me.

Actually, this article is about how to setup all the tools helping for developing modern web applications.

Continue reading

Why every Kafka message must be versioned?

Apache Kafka – is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications.

It is not the secret that Apache Kafka became a standard of communication between microservices last time.

Becoming a standard entails the need for proper operation and using.

The hint of being proper used is to provide every message sent to Kafka with version information. And here is why.

Continue reading

‘At least one’ validator

Are you familiar with Java Validation API? And Spring validation? (if not, take a look at the end of this article for links to read)

In my practice I had an interesting case. The task was to implement an web endpoint accepting the request which body consisted of three fields. And only one of them must be specified at the time.

Continue reading

Request-Reply pattern using Apache Kafka or How not to loose your data

There are many patterns to help with software design. The Gang-of-Fourth provides us with patterns to organize the code better. Enterprise Integration patterns (EIP) are the other list of patterns. They helps us with communications between applications.

One of EIP is Request-Reply.

It is very simple. When one service needs in some data it sends a Request to the other service which is responsible of such data. Then responsible service prepares an Response and provides the Requestor with it.

Continue reading

Normalized Logger for OpenFeign

Standard OpenFeign logger provides the only approach to log communications — it logs every header in separated log entries, the body goes into another log entry.

It is very inconvenient to deal with such logs in production especially in multithreaded systems.

‘Normalized Logger’ is intended to combine all log entries related to one request-reply communication into one log entry.

Continue reading