protected void enableConsumers ( List < ConsumerHolder > consumerHolders ) throws IOException { checkPreconditions ( consumerHolders ) ; try { for ( ConsumerHolder consumerHolder : consumerHolders ) { consumerHolder . enable ( ) ; } } catch ( IOException e ) { LOGGER . error ( "Failed to enable consumers - disabling already enabled consumers" ) ; disableConsumers ( consumerHolders ) ; throw e ; } }
Enables all consumers in the given list and hands them over for activation afterwards .