You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by vishva <vi...@gmail.com> on 2016/03/01 07:53:10 UTC

Re: activemq consumer does not return data even when queue not empty

Thanks artnaseef, for pointing me in the right direction.The issue was mainly
because it was running under JTA transaction, and hence the consumers were
not releasing the connection. So after around 50-100 polls, all the
connections were exhausted.

I was able to fix it by making

TransactionSupport = none

in the resources.xml

my final resources.xml looked like the following

<resources>
<Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
        ResourceAdapter = MyJmsResourceAdapter
        TransactionSupport = none
    </Resource>
</resources>



--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-consumer-does-not-return-data-even-when-queue-not-empty-tp4708474p4708623.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: activemq consumer does not return data even when queue not empty

Posted by artnaseef <ar...@artnaseef.com>.
Thanks for posting your findings.

That's an interesting fix given the fact that the JMS spec states that a JMS
connection created within a JTA transaction participates in that transaction
automatically (although I'm sure it's fine for a provider to allow a means
to pull it out of the transaction).

Another approach to consider here is connection pooling with consumer
caching.  These are commonly used to solve the same problem.  Google
searches here will bring up useful resources.  With that said, my 2 cents --
if the solution works for you, and tests out fine, then feel free to stick
with it!



--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-consumer-does-not-return-data-even-when-queue-not-empty-tp4708474p4708647.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.