Source:
private OffsetManager createOffsetManager(String group, long referencePoint) { try { OffsetManager delegateOffsetManager; if (OffsetManagement.kafkaNative.equals(offsetManagement)) { KafkaTopicOffsetManager kafkaOffsetManager = new KafkaTopicOffsetManager(zookeeperConnect, offsetStoreTopic, Collections.<Partition, Long>emptyMap()); kafkaOffsetManager.setConsumerId(group); kafkaOffsetManager.setReferenceTimestamp(referencePoint); kafkaOffsetManager.setSegmentSize(offsetStoreSegmentSize); kafkaOffsetManager.setRetentionTime(offsetStoreRetentionTime); kafkaOffsetManager.setRequiredAcks(offsetStoreRequiredAcks); kafkaOffsetManager.setMaxSize(offsetStoreMaxFetchSize); kafkaOffsetManager.setBatchBytes(offsetStoreBatchBytes); kafkaOffsetManager.setMaxQueueBufferingTime(offsetStoreBatchTime); kafkaOffsetManager.afterPropertiesSet(); delegateOffsetManager = kafkaOffsetManager; } else { KafkaNativeOffsetManager kafkaOffsetManager = new KafkaNativeOffsetManager(connectionFactory, zookeeperConnect, Collections.<Partition, Long>emptyMap()); kafkaOffsetManager.setConsumerId(group); kafkaOffsetManager.setReferenceTimestamp(referencePoint); kafkaOffsetManager.afterPropertiesSet(); delegateOffsetManager = kafkaOffsetManager; } WindowingOffsetManager windowingOffsetManager = new WindowingOffsetManager(delegateOffsetManager); windowingOffsetManager.setTimespan(offsetUpdateTimeWindow); windowingOffsetManager.setCount(offsetUpdateCount); windowingOffsetManager.setShutdownTimeout(offsetUpdateShutdownTimeout); windowingOffsetManager.afterPropertiesSet(); return windowingOffsetManager; } catch (Exception e) { throw new RuntimeException(e); } }

Target:
private OffsetManager createOffsetManager(String group, long referencePoint) { try { OffsetManager delegateOffsetManager; if (OffsetManagement.kafkaNative.equals(offsetManagement)) { KafkaNativeOffsetManager kafkaOffsetManager = new KafkaNativeOffsetManager(connectionFactory, zookeeperConnect, Collections.<Partition, Long>emptyMap()); kafkaOffsetManager.setConsumerId(group); kafkaOffsetManager.setReferenceTimestamp(referencePoint); kafkaOffsetManager.afterPropertiesSet(); delegateOffsetManager = kafkaOffsetManager; } else { KafkaTopicOffsetManager kafkaOffsetManager = new KafkaTopicOffsetManager(zookeeperConnect, offsetStoreTopic, Collections.<Partition, Long>emptyMap()); kafkaOffsetManager.setConsumerId(group); kafkaOffsetManager.setReferenceTimestamp(referencePoint); kafkaOffsetManager.setSegmentSize(offsetStoreSegmentSize); kafkaOffsetManager.setRetentionTime(offsetStoreRetentionTime); kafkaOffsetManager.setRequiredAcks(offsetStoreRequiredAcks); kafkaOffsetManager.setMaxSize(offsetStoreMaxFetchSize); kafkaOffsetManager.setBatchBytes(offsetStoreBatchBytes); kafkaOffsetManager.setMaxQueueBufferingTime(offsetStoreBatchTime); kafkaOffsetManager.afterPropertiesSet(); delegateOffsetManager = kafkaOffsetManager; } WindowingOffsetManager windowingOffsetManager = new WindowingOffsetManager(delegateOffsetManager); windowingOffsetManager.setTimespan(offsetUpdateTimeWindow); windowingOffsetManager.setCount(offsetUpdateCount); windowingOffsetManager.setShutdownTimeout(offsetUpdateShutdownTimeout); windowingOffsetManager.afterPropertiesSet(); return windowingOffsetManager; } catch (Exception e) { throw new RuntimeException(e); } }