[
https://issues.apache.org/activemq/browse/AMQ-2772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Tully reassigned AMQ-2772:
-------------------------------
Assignee: Gary Tully
> ActiveMQConnectionConsumer will break failover
> ----------------------------------------------
>
> Key: AMQ-2772
> URL: https://issues.apache.org/activemq/browse/AMQ-2772
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector
> Affects Versions: 5.3.2
> Reporter: Siim Kaalep
> Assignee: Gary Tully
>
> ActiveMQConnection.transportInterupted assumes that
> dispatchers.size() == all session's consumers + one advisoryConsumer
> But ActiveMQConnectionConsumer also registers itself as dispatcher in
> constructor.
> On failover attempt connection will remain in waiting state.
> Logging "dispatch paused, waiting for outstanding dispatch interruption
> processing (1) to complete.."
> ActiveMQConnectionConsumer is used in ActiveMQ resource adapter in
> ActiveMQEndpointWorker.
> Robust fix:
> {noformat}
> Index:
> trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
> ===================================================================
> ---
> trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
> +++
> trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
> @@ -1840,7 +1840,7 @@
> }
>
> public void transportInterupted() {
> - transportInterruptionProcessingComplete = new
> CountDownLatch(dispatchers.size() - (advisoryConsumer != null ? 1:0));
> + transportInterruptionProcessingComplete = new
> CountDownLatch(dispatchers.size() - (advisoryConsumer != null ? 1:0) -
> connectionConsumers.size());
> if (LOG.isDebugEnabled()) {
> LOG.debug("transport interrupted, dispatchers: " +
> transportInterruptionProcessingComplete.getCount());
> }
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.