[
https://issues.apache.org/jira/browse/AMQ-6156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15134369#comment-15134369
]
Ger Lawlor commented on AMQ-6156:
---------------------------------
Hi,
I also tried the format you suggest e.g.
failover:(tcp://localhost:61616)?maxReconnectAttempts=5&maxReconnectDelay=30000&startupMaxReconnectAttempts=3&timeout=1000&randomize=false
This is the error I get:
Invalid connect parameters: {startupMaxReconnectAttempts=3, timeout=1000}
Thus the reason for me moving them onto the tcp transport URL. I had the double
tcp localhost urls in their for primary/failover testing previously, so that
can be ignored. According to the docs, the above should work.
Thoughts?
Ger.
> ActiveMQConnection threads in parked state during startup
> ---------------------------------------------------------
>
> Key: AMQ-6156
> URL: https://issues.apache.org/jira/browse/AMQ-6156
> 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 connection
> 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(LockSupport.java:118)
> at
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1841)
>
> at
> java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:341)
> at
> org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
>
> at
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:80)
>
> at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1195)
>
> at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1289)
>
> at
> org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:456)
> at ActiveMQConnect.initializeConnection(ActiveMQConnect.java:63)
> The JMS producer connects using failover transport to an active/passive or
> primary/failover configuration.
> 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
(v6.3.4#6332)