Source:
public EventProducer(DatastreamTask task, TransportProvider transportProvider, CheckpointProvider checkpointProvider, Properties config, boolean customCheckpointing) { Validate.notNull(transportProvider, "null transport provider"); Validate.notNull(checkpointProvider, "null checkpoint provider"); Validate.notNull(config, "null config"); _datastreamTask = task; _datastreamName = task.getDatastreams().get(0).getName(); _serDeSet = task.getDestinationSerDes(); _transportProvider = transportProvider; _checkpointPolicy = customCheckpointing ? CheckpointPolicy.CUSTOM : CheckpointPolicy.DATASTREAM; _producerId = PRODUCER_ID_SEED.getAndIncrement(); _logger = LoggerFactory.getLogger(String.format("%s:%d", MODULE, _producerId)); if (customCheckpointing) { _checkpointProvider = new NoOpCheckpointProvider(); } else { _checkpointProvider = checkpointProvider; } _availabilityThresholdSlaMs = Integer.parseInt(config.getProperty(AVAILABILITY_THRESHOLD_SLA_MS, DEFAULT_AVAILABILITY_THRESHOLD_SLA_MS)); _availabilityThresholdAlternateSlaMs = Integer.parseInt(config.getProperty(AVAILABILITY_THRESHOLD_ALTERNATE_SLA_MS, DEFAULT_AVAILABILITY_THRESHOLD_ALTERNATE_SLA_MS)); _flushInterval = Duration.ofMillis(Long.parseLong(config.getProperty(CONFIG_FLUSH_INTERVAL_MS, DEFAULT_FLUSH_INTERVAL_MS))); _logger.info(String.format("Created event producer with customCheckpointing=%s", customCheckpointing)); _dynamicMetricsManager = DynamicMetricsManager.getInstance(); _dynamicMetricsManager.createOrUpdateCounter(MODULE, AGGREGATE, EVENTS_PRODUCED_OUTSIDE_SLA, 0); _dynamicMetricsManager.createOrUpdateCounter(MODULE, _datastreamTask.getConnectorType(), EVENTS_PRODUCED_OUTSIDE_SLA, 0); _skipBadMessagesEnabled = skipBadMessageEnabled(task); if (_skipBadMessagesEnabled) { _dynamicMetricsManager.createOrUpdateCounter(MODULE, _datastreamName, SKIPPED_BAD_MESSAGES_RATE, 0); } }

Target:
public EventProducer(DatastreamTask task, TransportProvider transportProvider, CheckpointProvider checkpointProvider, Properties config, boolean customCheckpointing) { Validate.notNull(transportProvider, "null transport provider"); Validate.notNull(checkpointProvider, "null checkpoint provider"); Validate.notNull(config, "null config"); _datastreamTask = task; _datastreamName = task.getDatastreams().get(0).getName(); _serDeSet = task.getDestinationSerDes(); _transportProvider = transportProvider; _checkpointPolicy = customCheckpointing ? CheckpointPolicy.CUSTOM : CheckpointPolicy.DATASTREAM; _producerId = PRODUCER_ID_SEED.getAndIncrement(); _logger = LoggerFactory.getLogger(String.format("%s:%d", MODULE, _producerId)); if (customCheckpointing) { _checkpointProvider = new NoOpCheckpointProvider(); } else { _checkpointProvider = checkpointProvider; } _availabilityThresholdSlaMs = Integer.parseInt(config.getProperty(AVAILABILITY_THRESHOLD_SLA_MS, DEFAULT_AVAILABILITY_THRESHOLD_SLA_MS)); _availabilityThresholdAlternateSlaMs = Integer.parseInt(config.getProperty(AVAILABILITY_THRESHOLD_ALTERNATE_SLA_MS, DEFAULT_AVAILABILITY_THRESHOLD_ALTERNATE_SLA_MS)); _flushInterval = Duration.ofMillis(Long.parseLong(config.getProperty(CONFIG_FLUSH_INTERVAL_MS, DEFAULT_FLUSH_INTERVAL_MS))); _logger.info(String.format("Created event producer with customCheckpointing=%s", customCheckpointing)); _dynamicMetricsManager = DynamicMetricsManager.getInstance(); _dynamicMetricsManager.createOrUpdateCounter(MODULE, AGGREGATE, EVENTS_PRODUCED_OUTSIDE_SLA, 0); _dynamicMetricsManager.createOrUpdateCounter(MODULE, _datastreamTask.getConnectorType(), EVENTS_PRODUCED_OUTSIDE_SLA, 0); _skipBadMessagesEnabled = skipBadMessageEnabled(task); if (_skipBadMessagesEnabled) { _dynamicMetricsManager.createOrUpdateCounter(MODULE, _datastreamName, SKIPPED_BAD_MESSAGES_COUNTER, 0); } }