You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2018/12/04 14:34:01 UTC
[jira] [Updated] (AMQ-7040) consumer.receive(timeout) blocks
infinitely if the connection is not started for vm://localhost uris with
policyentry QueuePrefetch=0
[ https://issues.apache.org/jira/browse/AMQ-7040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Baptiste Onofré updated AMQ-7040:
--------------------------------------
Summary: consumer.receive(timeout) blocks infinitely if the connection is not started for vm://localhost uris with policyentry QueuePrefetch=0 (was: consummer.receive(timeout) blocks infinitely if the connection is not started for vm://localhost uris with policyentry QueuePrefetch=0 )
> consumer.receive(timeout) blocks infinitely if the connection is not started for vm://localhost uris with policyentry QueuePrefetch=0
> --------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-7040
> URL: https://issues.apache.org/jira/browse/AMQ-7040
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.13.3
> Reporter: Jon Harper
> Priority: Major
> Attachments: QueuePrefetchBlockedTestCase.zip
>
>
> Start a broker with
> {code:xml}
> <policyEntry queue=">" queuePrefetch="0"/>
> {code}
> Run "normal" client code but forget to start() the connection.
> {code:java}
> ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("failover:(tcp://localhost:61616)");
> Connection con = connectionFactory.createConnection( );
> //didn't call con.start()
> Session session = con.createSession(true, Session.CLIENT_ACKNOWLEDGE);
> Destination destination = session.createQueue("TEST.FOO");
> final MessageConsumer consumer = session.createConsumer(destination);
>
> consummer.receive(1000); //Blocks infinitely
> }
> {code}
> Attached is a maven testcase that reproduces the problem:
> {noformat}
> $ mvn clean test
> testQueuePrefetch0TCP OK
> testQueuePrefetch0VM KO
> Results :
> Failed tests: testQueuePrefetch0VM(QueuePrefetchBlockedTestCase): receive should not block more than 1 second
> Tests run: 2, Failures: 1, Errors: 0, Skipped: 0
> {noformat}
> It works for tcp:// but not for vm://
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)