Quick RabbitMQ Tutorials With Examples in Java

RabbitMQ Tutorials With Examples in Java

Introduction This post is what I wish I have when starting with RabbitMQ. It contains: Let’s get started. Code Repo The code in this post is available here on Github. Important concepts Here are the important concepts in RabbitMQ: Exchange A messaging component in RabbitMQ that receives messages from producers and routes them to queues … Read more

Guide to ConcurrentModificationException

Guide to ConcurrentModificationException

Introduction If you run the following code: There are chances you will get the following exception: I said “there are chances” because you run the same code repeatedly, and sometimes there is no exception thrown. So, what is ConcurrentModificationException and when you might encounter it. The JDK’s said: This exception may be thrown by methods … Read more

Adapter Design Pattern Tutorial In Java

Adapter Design Pattern Tutorial In Java

Introduction The Adapter design pattern is a structural pattern that allows objects with incompatible interfaces to work together. It does this by converting the interface of one class into another interface that the client expects. This pattern is often used to make existing classes work with each other without modifying their source code. Real-world example … Read more

Introduction To The Law Of Demeter In Java

Introduction To The Law Of Demeter In Java

Introduction The law of Demeter states that objects should only interact with their immediate surroundings. Specifically: That means, the methods of an object should only call methods on other objects that: And it should not call methods on objects that: Here is a simple diagram to illustrate the principle: Friends, Strangers??? OK, some new terminologies … Read more