Spring Cloud Config Retry

When having a microservices environment we must think of the resiliency of our environment when platform services like config-service, discovery-service are not available for a short period of time. Let’s consider a customer-service which uses discovery first bootstrap registering with a discovery-service and getting external configuration from the config-service. What we want is to be able to start the services in any order.

Read More

subscribeOn and publishOn operators in Reactor

Reactor does not enforce a concurrency model, it leaves that to the developer. By default the execution happens in the thread of the caller to subscribe(). Let’s consider the following method where we subscribe with 4 consumers to a Flux of Integers which print out the thread name while processing the emitted elements in the Flux.

public static void createSubscribers(Flux<Integer> flux) {
    IntStream.range(1, 5).forEach(value ->
        flux.subscribe(integer -> System.out.println(value + " consumer processed "
                + integer + " using thread: " + Thread.currentThread().getName())));
Read More

Setting up X-Pack Security

X-Pack is a group of plugins for Elasticsearch and Kibana which enhances the functionality of the Elastic Stack. We will focus in this blog post on the Security plugin but there are other plugins for Monitoring, Graph and Machine Learning.

Read More

Spring Cloud Services - Service Registry

Service registry is key component in a microservice architecture which allows applications to dynamically discover and call registered services instead of hand-configuring the used services. In this blog post we are going to look into Eureka and into Service Registry (which is based on Eureka) from Spring Cloud Services. Eureka comes from Netflix and has two components Eureka Server and Eureka Client. The Eureka Server can be embedded in a Spring Boot application using the @EnableEurekaServer annotation, but here we look into how to run it using the Spring Boot CLI with Spring Cloud CLI extension installed.
The spring cloud --list lists the available services which can be started

Read More