We will cover here how to do DAO integration test when you have spring boot application with PostgreSQL DB and liquibase for schema versioning , last time we have explained how to do the same without liquibase using embedded PostgreSQL in this post but this time we will do the same but using docker with test containers which will apply your liquibase changes and making sure you DAO integration test has the same environment as production database environment if you are using docker for your data base in production .Continue reading
We will go through specific module(Resilience4j-Retry) from Resilience4j which is a fault tolerance library designed for Java8 and functional programming and it is lightweight library with minimal dependencies (mainly vavr)
When you retry , there are many cases for example :
- cross micro services communication for remote systems calls which most likely will need circuit breaker logic added as well
- if you have business or functional logic that need to get a consistent end state and most likely it is asynchronous Flow
Here we will explain to use Junit 5 and Mockito 2 with Spring boot 2 when it comes to unit testing and integration tests .
Now here we will share some possible designs when you use the spring boot event sourcing toolkit starter plus some remarks and action points .
What are some possible designs using the toolkit for event sourcing and CQRS services :
In this post we will show how we can do the following :
- Integrate spring boot with Apache Ignite
- How to enable and use persistent durable memory feature of Apache Ignite which can persist your cache data to the file disk to survive crash or restart so you can avoid data losing.
- How to execute SQL queries over ignite caches
- How to unit test and integration test ignite with spring boot
- Simple Jenkins pipeline reference
- Code repository in GitHub : GithubRepo
How to guarantee your single computation task is guaranteed to failover in case of node failures in apache Ignite ?
As you know failover support in apache ignite for computation tasks is only covered for master slave jobs where slave nodes will do computations then reduce back to the master node , and in case of any failure in slave nodes where slave jobs are executing , then it that failed slave job will fail over to another node to continue execution .
Ok what about if I need to execute just single computation task and I need to have failover guarantee due may be it is a critical task that do financial data modification or must finished task in an acceptable status (Success or Failure) , how we can do that ? it is not supported out of the box by Ignite but we can have a small design extension using Ignite APIs to cover the same , HOW ?
Code reference is hosted into my github :