if ( _activeClusters.contains(cluster))
throw new DatabusClientException("Cluster :" + cluster + " has already been registed to this client instance." +
" Only one registration per cluster is allowed for a databus client instance !!");
ClusterRegistrationStaticConfig c = _clientStaticConfig.getClientCluster(cluster);
if ( null == c )
throw new DatabusClientException("Cluster Configuration for cluster (" + cluster + ") not provided !!");
if ( null == consumerFactory)
throw new DatabusClientException("Consumer Factory is null !!");
ClusterCheckpointPersistenceProvider.StaticConfig ckptPersistenceProviderConfig =
new ClusterCheckpointPersistenceProvider.StaticConfig(c.getZkAddr(),c.getClusterName(),c.getMaxCkptWritesSkipped(),c.getCheckpointIntervalMs());
DbusClusterInfo clusterInfo = new DbusClusterInfo(c.getClusterName(), c.getNumPartitions(), c.getQuorum());
RegistrationId regId = RegistrationIdGenerator.generateNewId(c.getClusterName());
DatabusV2ClusterRegistrationImpl reg =
new DatabusV2ClusterRegistrationImpl(regId, this, ckptPersistenceProviderConfig, clusterInfo, consumerFactory, filterFactory, partitionListener, sources);
_regList.add(reg);
reg.onRegister();