ARTEMIS-179 Do not reconnect bridge on DISCONNECT
Note: this breaks scale-down because the bindings are removed.
This commit is contained in:
parent
f3be78a096
commit
682cad63f3
|
@ -587,8 +587,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
|
||||||
else {
|
else {
|
||||||
ActiveMQServerLogger.LOGGER.debug("Received invalid scaleDownTargetNodeID: " + scaleDownTargetNodeID);
|
ActiveMQServerLogger.LOGGER.debug("Received invalid scaleDownTargetNodeID: " + scaleDownTargetNodeID);
|
||||||
|
|
||||||
//we never fail permanently here, this only happens once all reconnect tries have happened
|
fail(me.getType() == ActiveMQExceptionType.DISCONNECTED);
|
||||||
fail(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tryScheduleRetryReconnect(me.getType());
|
tryScheduleRetryReconnect(me.getType());
|
||||||
|
|
|
@ -340,8 +340,10 @@ public class ClusterConnectionBridge extends BridgeImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void tryScheduleRetryReconnect(final ActiveMQExceptionType type) {
|
protected void tryScheduleRetryReconnect(final ActiveMQExceptionType type) {
|
||||||
|
if (type != ActiveMQExceptionType.DISCONNECTED) {
|
||||||
scheduleRetryConnect();
|
scheduleRetryConnect();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void fail(final boolean permanently) {
|
protected void fail(final boolean permanently) {
|
||||||
|
|
|
@ -1428,8 +1428,10 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
|
||||||
ActiveMQServerLogger.LOGGER.debug("Removing record for: " + targetNodeID);
|
ActiveMQServerLogger.LOGGER.debug("Removing record for: " + targetNodeID);
|
||||||
MessageFlowRecord record = records.remove(targetNodeID);
|
MessageFlowRecord record = records.remove(targetNodeID);
|
||||||
try {
|
try {
|
||||||
|
if (record != null) {
|
||||||
record.close();
|
record.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue