Skip to content

Commit

Permalink
Remove default configs in favor of env settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlb committed Jan 2, 2024
1 parent 3111f30 commit 52fac08
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ public class BulkIngestKafkaProducer extends AbstractExecutionThreadService {

private static final Set<String> OVERRIDABLE_CONFIGS =
Set.of(
ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG,
ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
ProducerConfig.LINGER_MS_CONFIG,
ProducerConfig.BATCH_SIZE_CONFIG,
ProducerConfig.MAX_BLOCK_MS_CONFIG,
ProducerConfig.COMPRESSION_TYPE_CONFIG);
ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG);

public BulkIngestKafkaProducer(
final DatasetMetadataStore datasetMetadataStore,
Expand Down Expand Up @@ -273,10 +268,6 @@ private KafkaProducer<String, byte[]> createKafkaTransactionProducer(String tran
ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,
"org.apache.kafka.common.serialization.ByteArraySerializer");
props.put(ProducerConfig.TRANSACTIONAL_ID_CONFIG, transactionId);
props.put(ProducerConfig.LINGER_MS_CONFIG, 500);
props.put(ProducerConfig.BATCH_SIZE_CONFIG, 128000);
props.put(ProducerConfig.MAX_BLOCK_MS_CONFIG, 10000);
props.put(ProducerConfig.COMPRESSION_TYPE_CONFIG, "snappy");

// don't override the properties that we have already set explicitly using named properties
for (Map.Entry<String, String> additionalProp :
Expand Down

0 comments on commit 52fac08

Please sign in to comment.