message queueing up on producer side and none on the consumer queue
maybenow May 9, 2013 12:22 PMwe have a simple case, use hornetq 2.2.14 to send message to multipl subcriber.
we have the seesion created as the suggestion http://stackoverflow.com/questions/6452505/hornetq-messages-still-remaining-in-queue-after-consuming-using-core-api
or https://community.jboss.org/thread/168449
our case is quite similar to the above example.
when we using jconsole to monitory the consumer queue, we see the message count and delivering count are all 0, after fire over 10k message
but on producer queue, the message count is the same as we message we send total. and around that time the send is blocked
the jstack info is as following
"http-0.0.0.0-8680-20" daemon prio=10 tid=0x00007f62bc022800 nid=0xf8d6 waiting on condition [0x00007f625bf7c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006157b00a0> (a java.util.concurrent.Semaphore$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:811)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:969)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1281)
at java.util.concurrent.Semaphore.acquire(Semaphore.java:441)
at org.hornetq.core.client.impl.ClientProducerCreditsImpl.acquireCredits(ClientProducerCreditsImpl.java:81)
at org.hornetq.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:305)
at org.hornetq.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:135)
at com.apple.iad.ims.server.replconnector.ReplConnectorHornetQImpl.send(ReplConnectorHornetQImpl.java:150)
at com.apple.iad.ims.server.api.DeleteCampaign.deleteCampaignImpl(DeleteCampaign.java:61)
at com.apple.iad.ims.server.api.DeleteCampaign.deleteCampaign(DeleteCampaign.java:44)
at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
we have the message.ack call after received the message and reuse the session, producer and consumer as suggested in the document.
any idea, why this is caused? the code and configuration is posted below
Thanks a lot