/images/logo.jpg

Korneliusz Rabczak

CircuitBreaker - cure for fallen microservices

In time of microservices, it’s relevant how we think about securing remote communication between multiple applications and how we react on network/application failure as a client. If our application depends on many external services and communicates with them remotely, it should be protected in case of network problems or unavailability of the application. One of the basic solutions is to use CircuitBreaker pattern, you can find more detailed description on Martin Fowler’s website http://martinfowler.com/bliki/CircuitBreaker.html.

Exposing WildFly JMS queue statistics through REST/JSON for monitoring

Today I want to show you how easily you can monitor your JMS queues on WildFly 8 application server. JMS provides some statistics data like total added messages, messages pending in queue or number of consumers connected to queue. We can gather and analyze those data in our monitoring system.

We could also create triggers for the purpose of alerting us when there are no consumers for the queue. This could easily end up with queue swelling thousands of messages. We will use Dropwizard Metrics library which is very nice and easy for gathering and measuring data in our application. We will expose this data through REST as JSON. We won’t rely on JMX protocol because protocol used for providing data for monitoring should be technology agnostic. While providing data for monitoring system, we should use standard protocol for every technology, in our case, it will be HTTP.

Self improvement and continuous learning

I’ve got an idea that writing a blog should be my next step in improving myself. I’ll write mostly about technical stuff like java, jvm, microservices, frameworks but also about my thoughts about other relevant things. I treat my blog as an archive for my ideas, proof of concepts and thoughts that I want to share with other programmers. Even if nobody reads it, it will be a nice practice for me.