|
You indicated that you're using the default configuration which limits the size of all queues and topics to 5mb and, by default in ActiveMQ, producer flow control
I did not mention that I have 25 Message Consumers also listening on the same queue. So there is no reason for the producers to hang as eventually the producers and consumers should achieve equilibrium message rate. The problem persists even after killing the producers and consumers and restarting the consumers.
The consumers and/or producers are not sharing a Session object are they?
No, The producer, server and consumer are all running on separate machines.
Consumer Thread Dump is attached as well
This could still be the broker invoking the producer flow control because the consumers are either not consuming messages are are too slow. Are the consumers actually consuming messages? If so, are they actually acknowledging messages? Please attach the code for your consumers.
I am using DUPS_OK_ACKNOWLEDGE acknowledgement mode and I explicitly call acknowledge() only if the Acknowledge Mode is CLIENT_ACKNOWLEDGE.
This works ok if there is only 1 consumer on the queue. If I create multiple consumers I start to see the hang with Acknowledge Mode AUTO_ACKNOWLEDGE and DUPS_OK_ACKNOWLEDGE. Here is the code: public void onMessage ( Message aMessage ) } }catch (Exception e) { e.printStackTrace(); }} Confirmed that this is only a problem with DUPS_OK_ACKNOWLEDGE and multiple sessions
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
ctQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
.await(AbstractQueuedSynchronizer.java:1925)
at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:
317)
at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse
.java:40)
at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorr
elator.java:80)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
ion.java:1233)
at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1659)
at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProdu
cer.java:227)
at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessa
geProducerSupport.java:269)
at perf.harness.ProducerObj.sendMsg(ProducerObj.java:317)
at perf.harness.ProducerObj.run(ProducerObj.java:237)
at java.lang.Thread.run(Thread.java:619)