Streaming With Reactive Java and Spring JDBCTemplate
I started learning about RxJava while working on implementing Hystrix Circuit Breaker for the microservices that I was developing. Recently I had a use case where I had to load a lot of data from the backend database. I ended up not implementing the streaming that I am about to describe at my work, but I still think this might be useful for anyone trying to load data from database but does not need the entire data set. I am not saying this is the case all the time but this code could come in handy in some cases. You can find the entire code at : GIT Let us start with the code that calls the Streaming interface. QueryStreamerJdbcTemplate template = new QueryStreamerJdbcTemplate(dataSource); Semaphore semaphore = new Semaphore(1); semaphore.acquire(1);…