It appears that the selection is round-robin, but not in the way you want.
The round-robin of dispatching to clients is performed as usual by ActiveMQ
- meaning every message goes to the next consumer in-line; here's the basic
flow:
ON MESSAGE DISPATCH
LOOP UNTIL no more consumers OR matching consumer found
IF message CAN DISPATCH to current consumer
THEN
SET matching consumer found
ELSE
ADVANCE to next consumer
END IF
END LOOP
IN the "can dispatch" logic - a new message group gets assigned to the
"current consumer". So, which consumer gets the next group assignment is
really based on the last consumer to which a message was dispatched.
The code in question is in Queue.java, doActualDispatch() and
assignMessageGroup().
--
View this message in context:
http://activemq.2283324.n4.nabble.com/Dispatch-policy-for-ActiveMQ-with-new-message-groups-tp4687812p4687828.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.