use of org.apache.activemq.artemis.core.replication.ReplicationEndpoint in project activemq-artemis by apache.
the class BackupSyncDelay method intercept.
@Override
public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException {
if (packet.getType() == PacketImpl.BACKUP_REGISTRATION) {
try {
SharedNothingBackupActivation activation = (SharedNothingBackupActivation) backup.getActivation();
ReplicationEndpoint repEnd = activation.getReplicationEndpoint();
handler.addSubHandler(repEnd);
Channel repChannel = repEnd.getChannel();
repChannel.setHandler(handler);
handler.setChannel(repChannel);
live.getRemotingService().removeIncomingInterceptor(this);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return true;
}
use of org.apache.activemq.artemis.core.replication.ReplicationEndpoint in project activemq-artemis by apache.
the class SharedNothingBackupActivation method init.
public void init() throws Exception {
assert replicationEndpoint == null;
activeMQServer.resetNodeManager();
backupUpToDate = false;
replicationEndpoint = new ReplicationEndpoint(activeMQServer, shutdownOnCriticalIO, attemptFailBack, this);
}
Aggregations