Skip to content

Commit e697d3b

Browse files
author
chengyitian
committed
AJ-690: init backupSites related params when unsubscribe.
1 parent d1cf7c9 commit e697d3b

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

src/com/xxdb/streaming/client/PollingClient.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ protected void unsubscribeInternal(String host, int port, String tableName, Stri
213213
// synchronized (queueManager) {
214214
queueManager.removeQueue(topic);
215215
// }
216+
217+
// init backupSites related params.
218+
if (AbstractClient.ifUseBackupSite) {
219+
AbstractClient.ifUseBackupSite = false;
220+
AbstractClient.subOnce = false;
221+
AbstractClient.resubTimeout = 100;
222+
}
216223
log.info("Successfully unsubscribed table " + fullTableName);
217224
} catch (Exception ex) {
218225
throw ex;

src/com/xxdb/streaming/client/ThreadPooledClient.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,13 @@ protected void unsubscribeInternal(String host, int port, String tableName, Stri
382382
// synchronized (queueManager) {
383383
queueManager.removeQueue(topic);
384384
// }
385+
386+
// init backupSites related params.
387+
if (AbstractClient.ifUseBackupSite) {
388+
AbstractClient.ifUseBackupSite = false;
389+
AbstractClient.subOnce = false;
390+
AbstractClient.resubTimeout = 100;
391+
}
385392
log.info("Successfully unsubscribed table " + fullTableName);
386393
} catch (Exception ex) {
387394
throw ex;

src/com/xxdb/streaming/client/ThreadedClient.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,13 @@ protected void unsubscribeInternal(String host, int port, String tableName, Stri
546546
// synchronized (queueManager) {
547547
queueManager.removeQueue(lastBackupSiteTopic);
548548
// }
549+
550+
// init backupSites related params.
551+
if (AbstractClient.ifUseBackupSite) {
552+
AbstractClient.ifUseBackupSite = false;
553+
AbstractClient.subOnce = false;
554+
AbstractClient.resubTimeout = 100;
555+
}
549556
log.info("Successfully unsubscribed table " + fullTableName);
550557
} catch (Exception ex) {
551558
throw ex;

0 commit comments

Comments
 (0)