activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] [Commented] (AMQ-6156) ActiveMQConnection threads in parked state during startup
Date Fri, 05 Feb 2016 15:28:39 GMT


Timothy Bish commented on AMQ-6156:

Your URI is incorrect, the failover options don't get applied to each TCP transport instance
in the URI, try this:


I don't really know why you have the same address in there twice, no need for two {{tcp://localhost:61616}}
addresses in there.

> ActiveMQConnection threads in parked state during startup
> ---------------------------------------------------------
>                 Key: AMQ-6156
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 5.11.1
>         Environment: Linux
>            Reporter: Ger Lawlor
> I've implemented a JMS producer using org.apache.activemq.ActiveMQConnectionFactory API.
In the deployment they are 10 threads launched and each thread invokes the following sequence
of methods which wrap around the ActiveMQConnection API.
> connector = new ActiveMQConnect();
> connector.setEndPointURL(primaryURL, secondaryURL, connectorQueryString);
> connector.setCredentials(userName, password);
> connector.initializeConnection();
> connector.setDestinationQueue(queueName);
> connector.addMessageToQueue(message);
> connector.sendMessageToQueue();
> The call to initializeConnection in turn invokes the following code which returns the
> 1) ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(m_userName,
m_password, m_endPointUrl);
> 2) m_queueConnection = connectionFactory.createConnection();
> 3) m_queueConnection.start();
> However, (and potentially under load), a large % of the threads enter the parked state
and stay there. The stack trace for these threads is as follows:
> java.lang.Thread.State: WAITING 
>         at sun.misc.Unsafe.park(Native Method) 
>         at java.util.concurrent.locks.LockSupport.park( 
>         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(

>         at java.util.concurrent.ArrayBlockingQueue.take(

>         at org.apache.activemq.transport.FutureResponse.getResult(

>         at org.apache.activemq.transport.ResponseCorrelator.request(

>         at org.apache.activemq.ActiveMQConnection.syncSendPacket(

>         at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(

>         at org.apache.activemq.ActiveMQConnection.start(

>         at ActiveMQConnect.initializeConnection( 
> The JMS producer connects using failover transport to an active/passive or primary/failover
> Is the problem being caused by the failover URL? The documentation seemed to indicate
that the failover URL can be sent with format:
> failover:(tcp://amq01:61616,tcp://amq02:61616)?queryString....
> Would appreciate any advice so I can resolve this issue.

This message was sent by Atlassian JIRA

View raw message