Reactive Spring

Reactive MongoDB with Spring boot

MongoDB has changed a lot over the last few years. I have not used it for more than eight years in production now. I recently need to use MongoDB as a multi-purpose data store. It surprised me a lot with the new features, but I was slightly disappointed with the problems of read and write concerns at default settings.  However, you can set it to a majority or a higher level to achieve casual consistency. In this post we are going to cover how to create a spring boot service, connect to Mongo DB with a reactive driver, and perform...

Continue reading...

Developing reactive microservice using Springboot 2

Reactive Spring is based on the project reactor for building non-blocking applications using the spring platform and spring cloud frameworks. Three important interfaces available in Reactor are Publisher, Subscriber, and Processor. Publisher – source of the data Subscriber – One which receives data asynchronously Processor – nothing but a publisher which is also a subscriber (most of the time we won’t need this) Reactor introduces reactive types which implement the Publisher interface namely Flux and Mono. Flux – represents multiple sequences of a result 0…N (many items) which suggests Flux is a standard publisher Mono – As the name suggests,...

Continue reading...