Hello,
I have set up a project that uses ActiveMQ for messaging. My configurations
are the following: 
Producer Side: 
producerSession: transacted= false and Acknowledgment =
CLIENT_ACKNOWLEDGEMENT

Consumer Side: 
setQueuePrefetch = 1;

Whenever there is an event like generate OTP for a phone number. the
producer generates a message with required fields, adding the phone number
as JMSXGroupId and posts it to the queue. After this, the producer gets
offline until a new event generation is required. There are multiple types
of events and our user base is around 15k. 

Now, on the consumer side, I have 10 consumers that use receive() method
without any timeout mentioned. Now this message is received and converted to
the respective event and passed into a Service that consumes this message.
There could be three responses from the service: 
1. The event is executed successfully and returns true. In this case, I
invoke the *consumer.acknowledge()* method.
2. The event execution is not successful and returns false. In this case, I
again invoke the *consumer.acknowledge() *method and post a delayed message
(AMQ_Scheduled_Delay as 1 hour) to the queue.
3. While executing the event, it threw an exception. Now this exception, if
a JMSException then I reestablish the consumer connections to the broker, if
not then, I explicitly *acknowledge* the message and post a delayed message
after 6 hours.

Now the issue I'm facing is that the dispatch queue gets filled up with
value as 2 for most of the consumers (We have around 25K events a day
normally).  And out of these 10, only 2 or 3 consumers with dispatch queue
count as 0 are present. I could not figure out what is the issue. Could
anyone please help me as I need to restart the server twice a day so that
the consumers start consuming? 



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

Reply via email to