Open glassfishrobot opened 11 years ago
@glassfishrobot Commented Reported by ashley_taylor
@glassfishrobot Commented @nigeldeakin said: Are you saying that if imqConsumerFlowLimitPrefetch=false then the client "prefetch queue" still has a message in it?
@glassfishrobot Commented ashley_taylor said: correct can have one message on it.
@glassfishrobot Commented @amykang2020 said:
can have one message on it.
Does this "one message" happens on the first message to a consumer or always ?
@glassfishrobot Commented This issue was imported from java.net JIRA MQ-234
When running openmq with imqConsumerFlowLimitPrefetch=false the client prefetch queue has a maximum length of 1.
The issue is that when the message listener starts processing a message the queue is now empty so the client loads a new message onto the prefetch queue.
We have several consumers on this queue, our message processing time varies from a few seconds to a few minutes, when the prefetch happens on a consumer that is processing a long running message that next message is blocked until it finishes even though we have other available consumers.
We run each consumer in its own jvm because we are executing 3rd party uploaded code which sometimes is poorly written causing excessive memory or cpu utilization.
As a work around without fully understanding the design of the jmsclient library I modified the com.sun.messaging.jmq.jmsclient.SessionQueue class to have a peakWait method, also modified it to only work with the SequentialQueue class because I needed to add a peak method to that class as well.
then in com.sun.messaging.jmq.jmsclient.ConsumerReader
in the run method instead of calling the dequeWait I am calling peakWait then wrapped the code making use of response in a try finally block and in the finally call the deque so that the queue will only be emptied after the message has been processed.
Environment
glassfish3.1.1 remote jms client
Affected Versions
[4.5]