streamConsumers.addAll(_consumers);
boolean canConsumerBootstrap = false;
_streamConsumerRawRegistrations = new ArrayList<DatabusV2ConsumerRegistration>();
_streamConsumerRawRegistrations.add(new DatabusV2ConsumerRegistration(streamConsumers, _sources, _filterConfig));
for (DatabusCombinedConsumer c : _consumers)
{
if ( c.canBootstrap())
{
canConsumerBootstrap = true;
bootstrapConsumers.add(c);
}
}
boolean enableBootstrap = _client.getClientStaticConfig().getRuntime().getBootstrap().isEnabled();
Set<ServerInfo> candidateBootstrapServers = new HashSet<ServerInfo>();
if (enableBootstrap && canConsumerBootstrap)
{
if ( (null == bootstrapServers) || ( bootstrapServers.isEmpty()))
throw new DatabusClientException("No configured bootstrap servers in the client to start");
for (ServerInfo s : bootstrapServers)
{
if (canServe(s,_sources))
candidateBootstrapServers.add(s);
}
if (candidateBootstrapServers.isEmpty())
throw new DatabusClientException("No candidate bootstrap servers for source : " + _sources);
_bootstrapConsumerRawRegistrations = new ArrayList<DatabusV2ConsumerRegistration>();;
_bootstrapConsumerRawRegistrations.add(new DatabusV2ConsumerRegistration(bootstrapConsumers, _sources, _filterConfig));
}
// All validations done. Setup and start
initializeStatsCollectors();