Thanks for the quick response.

I am using ActiveMQ 5.15.10 and we are connecting to activemq using MuleSoft
which is running on 3.9.0 runtime version. I have set the queue prefetch at
the connection level (not at the broker) like below.

tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=1

I could see in the activemq console that the prefetch value as 1.

<http://activemq.2283324.n4.nabble.com/file/t379803/prefetch_image.jpg> 

If my understanding is correct, based on the prefetch value, activemq will
prefetch that many number of messages to the consumer while consumer is
handling a transaction already. in my case since I have set prefetch as 1,
it should prefetch only one but I don't this is happening correctly.

Note:  we are using "JMXGroupId" property in our project. When we set the
JMXGroupId, activemq will make sure that if one consumer thread is handling
a transaction with one JMXGroupId and if it receives another message with
same JMXGroupId, it will deliver to the same consumer thread. 

As per my example in the post (or provided below once again)

<http://activemq.2283324.n4.nabble.com/file/t379803/active_mq_timings.jpg> 


In the above picture, In the above picture, M3 is assigned to thread 1
(hoping that M3 is prefetched to thread 1 as we are using queue prefetch as
1) but after M2 is finished at "2020-02-21 12:43:03,323" why M5 with
JMXGroupId "1" is not assigned to Thread 2.

Anyway there are no messages with JMXGroupId "1" in the queue or with any
consumer thread.

Due to which we are losing the processing time for Message 5.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply via email to