[
https://issues.apache.org/jira/browse/ARTEMIS-4286?focusedWorklogId=862008&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-862008
]
ASF GitHub Bot logged work on ARTEMIS-4286:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 22/May/23 16:09
Start Date: 22/May/23 16:09
Worklog Time Spent: 10m
Work Description: gemmellr commented on code in PR #4485:
URL: https://github.com/apache/activemq-artemis/pull/4485#discussion_r1200731272
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java:
##########
@@ -129,21 +134,23 @@ private void connect() throws Exception {
throw new ActiveMQNonExistentQueueException("Queue " +
key.getQueueName() + " does not exist on remote");
}
}
- }
- } catch (Exception e) {
- try {
- if (clientSessionFactory != null) {
- clientSessionFactory.cleanup();
+ } catch (Exception e) {
+ try {
+ if (clientSessionFactory != null) {
+ clientSessionFactory.cleanup();
+ }
+ disconnect();
+ } catch (ActiveMQException ignored) {
}
- disconnect();
- } catch (ActiveMQException ignored) {
+ throw e;
Review Comment:
Not necessarily the spot to do it (perhaps in the task where it retries),
but the easiest to comment in this PR. It seems like it might be good to have
at least a trace log to indicate it has failed and is going to try connecting
again.
Issue Time Tracking
-------------------
Worklog Id: (was: 862008)
Time Spent: 50m (was: 40m)
> Sometimes federated consumer won't stop
> ---------------------------------------
>
> Key: ARTEMIS-4286
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4286
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
> If a federated consumer is in the process of connecting when it's closed it
> won't actually close. It will keep attempting to connect and once it actually
> connects it will operate as if it was never closed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)