ActiveMQ

I am using ActiveMQ 5.x on my current project. Initial integration was quite easy. Getting a broker running and some messages going around between a few clients took several days, much of which had to do with groking Spring configuration rules. I have to say Spring is pretty nice. But the initial ease with which I had request/reply messages being dispatched to Competing Consumers belied the rapidly increasing complexity of the system. Since it was so easy to get three clients and two services running, we loosened our design and now have nine different services and five clients. Six queues have become something like 22. It is still invigorating to  have the system work, but of course when it doesn’t work diagnoses is rather more challenging.

Initially global setting were enough for timeouts and prefetch and queue memory size, but no more. Now the work is in getting regression tests running. I should look at the test suite in ActiveMQ itself for ideas on setting up multiple machines for inter node tests.

Prefetch is one configuration item that needs to be per channel.  CompetingConsumers need a prefetch of 1 to work. Most of the other channels should be between 10 an 1000 I would think.

Timeouts is another one to think about. You don’t want to long a timout, if the request is going to fail then better to get it over with so appropriate action can then be taken.

Today I am having trouble understanding the behavior of a topic with producer flow control. One producer is getting block due to a slow consumer, but killing the consumer does not seem to end the block and I don’t know if it is a bug or correct behavior, or if there is yet another configuration option to consider.

Leave a Reply

You must be logged in to post a comment.