Remove debug mode

This commit is contained in:
k.struzhkin 2021-03-04 08:17:42 +03:00
parent ee89708053
commit ffb9b470f5
2 changed files with 1 additions and 9 deletions

View File

@ -32,8 +32,7 @@ public class StartupListener implements ApplicationListener<ContextRefreshedEven
private void initKafkaStream(EventSinkFactory eventSinkFactory) {
KafkaStreams kafkaStreams = eventSinkFactory.create();
//TODO return after debug withdrawal
// kafkaStreams.setUncaughtExceptionHandler(this::handleCriticalError);
kafkaStreams.setUncaughtExceptionHandler(this::handleCriticalError);
kafkaStreams.start();
eventSinkStreamsPool.add(kafkaStreams);
log.info("StartupListener start stream kafkaStreams: {}", kafkaStreams.allMetadata());

View File

@ -7,7 +7,6 @@ import com.rbkmoney.fraudbusters.mg.connector.mapper.Mapper;
import com.rbkmoney.machinegun.eventsink.MachineEvent;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Slf4j
@ -15,9 +14,6 @@ import org.springframework.stereotype.Component;
@RequiredArgsConstructor
public class LogWithdrawalMapperDecorator implements Mapper<TimestampedChange, MachineEvent, Withdrawal> {
@Value("${stream.withdrawal.debug:false}")
private boolean isDebug;
private final WithdrawalMapper withdrawalMapper;
@Override
@ -30,9 +26,6 @@ public class LogWithdrawalMapperDecorator implements Mapper<TimestampedChange, M
log.debug("Withdrawal map from change: {} event: {} ", change, event);
Withdrawal withdrawal = withdrawalMapper.map(change, event);
log.debug("Withdrawal map result: {}", withdrawal);
if (isDebug) {
return null;
}
return withdrawal;
}