Writing integration tests for RabbitMQ-based components

I’m writing this post after days of misery, reverse-engineering, github browsing and finding (sort of) clever ways to get yet one step closer to the goal mentioned in the title.

Before we dive into the topic, let me clarify a few things. RabbitMQ, an AMQP (advanced message queueing protocol)  compatible message oriented middleware, (in my understanding) has no in-memory message broker implementation. ActiveMQ, another AMQP compatible implementation, on the other hand does provide such a component – easy to configure and use. The problem is that ActiveMQ implements version 1.0 of the protocol, while RabbitMQ is on version 0.9.1, and the two versions, of course, are not compatible. That is the main reason one might need QPID, a third MOM implementation that comes with an in-memory message broker and is able to “speak” multiple versions of the protocol.

Continue reading “Writing integration tests for RabbitMQ-based components”

Advertisements

Work in the constructor anti-pattern

/**
* This post is intended to be a 101 quickie for the less experienced.
* It does not provide new or innovative ways of solving a certain problem,
* just summarizes a topic the way I see it.
*
**/

This is a topic many have already talked about (a lot), but it still pops up from time to time. Strangely enough, not only in case of junior developers. Continue reading “Work in the constructor anti-pattern”