Background

As well as having a pluggable dispatch policy (e.g. round robin etc), we now support consumer priorities.

This allows us to weight consumers to optimise network hops. For example, you typically want a broker to send messages to regular JMS consumers rather than to other brokers; there's no need to make unnecessary broker-to-broker hops if there are available consumers.

Example

The priority for a consumer is set using Destination Options as follows:

queue = new ActiveMQQueue("TEST.QUEUE?consumer.priority=10");
consumer = session.createConsumer(queue);
Graphic Design By Hiram