Posts

Showing posts from November, 2011

Virtual and Composite Destinations with Apache ActiveMQ

Image
Apache ActiveMQ / FUSE Message Broker has a feature called Virtual Destinations that are logical destinations (queues or topics) mapped to one or more physical destinations.

There are many benefits for using Virtual Destinations with ActiveMQ but basically you can forward messages from one JMS destination to many destinations (mixing queues and topics if you want), route messages to target destinations based on message headers (a.k.a broker-based message routing) and create highly-available load-balanced durable subscribers.



As an example, looking in the diagram above, you can have a Virtual Destination called q1, where applications will send messages to as they do to any other regular queue, and then the message will get propagated to a real physical queue called q1, to a real queue physical queue called Q2 and also to a topic called T1.

The example above is called Composite Destinations and the idea behind it is to map a Virtual Destinations to a hard-wired collection of physical de…

Load-balanced Ordered Message Processing with Apache ActiveMQ

Image
On my previous post (Preserving Message Order with Apache ActiveMQ) we took a look on what would be necessary to preserve message order using Apache ActiveMQ (FUSE Message Broker). We then explored on the ActiveMQ capabilities called Exclusive Consumers.
But, Exclusive Consumers bring one disadvantage that is having active consumers not doing anything (actually not consuming messages) and that may be not the desired behavior. So, let's take a look on how ActiveMQ (FUSE Message Broker) can help to avoid that situation and explore what capabilities and/or techniques are available to process messages in order when multiple consumers are active.
ActiveMQ has a feature called Message Groups which is the way to load balance multiple active consumers listening to the same queue while preserving message order. ActiveMQ will then group messages on the queue and it will guarantee that all messages of a particular group arrive in order on the same consumer.
So, to give you an example, let&#…

Preserving Message Order with Apache ActiveMQ

Image
There are some use cases and business scenarios where you have to process messages in order. Basically, when multiple consumers receive messages from a queue and process them in parallel, message order is not preserved.

Apache ActiveMQ has the capability to process messages in order using a feature called Exclusive Consumers. With Exclusive Consumers all messages from a single queue are processed by only one consumer (other consumers listening on the same queue will take over if the exclusive consumer fails).

So, fundamentally the diagram below shows how Exclusive Consumers work where Consumer A and Consumer B are both listening to the same queue but only the Consumer A is consuming messages from it.





The Exclusive Consumer feature is configured at the consumer level, so at the code level you have to explicitly say what queue you're listening in and also say you're an an exclusive consumer.

Here is a piece of code showing how to set the Exclusive Consumer:


queue = new ActiveMQQueue(…

We're hiring!

Do you have a technical background and also love the exciting sales world?

Do you like to be in front of the customers discussing technical architecture, new business opportunities and helping them solving the most complex integration problems?

Are you based in Europe (preferably in London)?

Do you want to work for a fast growing company in the open source integration and messaging business?

Well, the time has arrived… FuseSource is looking for a Solutions Engineer to join our team and be part of a very strategic group within the company.

The detailed job description is here: http://fusesource.com/careers/#SE but you can also contact me if you want to talk about it :)

Let's enjoy the ride together...

LinkedIn Veterans Hackday 2011

A little different topic today but for a really good cause. I really appreciate all the effort that the military personnel has been putting together and I have heard many stories from a few and also some scary ones from the war zone which is not fun at all. That's the reality of the world we live in and while we can't (yet) stop the war, we can improve the life of the ones being part of that.

Today, I found that LinkedIn is promoting a Veterans Hackday and honestly there is nothing better than being able to use your skills to give something back to those that sacrifices their lives every day.

So, I decided to use my tech skills and hack a little project that will benefit our veterans. I honestly can't do all of that by myself and I'm counting on those from the San Diego, CA area that are available and want to work together on this over the weekend.

As I just started organizing this, I don't have an idea yet but I'd be glad to start designing something as soon a…