Leader Election Spring Boot Starter

Published on

Leader Election Spring Boot Starter

Quick post:

For some reason, my post about leader election in spring boot remains one of the most accessed in this blog.

However, that solution appears to be invalid now, since it relied on Jedis, which is not available in later Spring versions.

So, to cover this scenario for whoever has this specific need, I’ve developed a quick starter that uses database locking to allow for a simple leader election mechanism. If your application uses JPA, you just need to add the starter and it will work out of the box.

It is available in maven central.

Comments

I feel that comments on specific blogs have been dying down as the times goes. If you have any questions or want to talk about the post, contact me through the below links.