How do activemq wildcards work?

I am using ActiveMQ 5.8 with wildcard users configured on a camel route.

I use ActiveMQ default configuration, so I have default values ​​below

prefetch = 1
dispatch policy= Round Robin

Now I am running a consumer jvm with 5 consumers each for two queues. both queues have the same message type and the same number of messages.

Consumers do nothing but print a message (so don't block db or a slow consumer problem)

EDIT I set preFetch to 1 for each queue

What I am observing is one of the lines that is depleting faster than others.

What I expect is tantamount to discharging the queue at the same pace as the load balance.

One amazing observation Although the activemq webconsole shows 5 consumers for each of these queues

enter image description here

When I debug my consumer, I see only 5 threads / consumers from the camel stream for the * .processQueue wildcard queue enter image description here

What will cause this behavior? How am I sure that the whole line will flow at an equal pace?

Does anyone have any experience with sharing custom mailing rules or overriding activemq's default values?

+4
source share
2 answers

I managed to find a link to this behavior

The distribution of messages in the case of users of the wildcard queue is random.

http://activemq.2283324.n4.nabble.com/Wildcard-and-message-distribution-td2346132.html#a2346133

, .

, , .

prefetch = number of wildcard consumers
+2

, , . . , , ( , ).

, , , , . , .

0

All Articles