Skip to content

Commit

Permalink
moved kafka config from threat detection to utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ag060 committed Dec 12, 2024
1 parent 2b1808b commit a6176d3
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.akto.threat.detection;

import com.akto.DaoInit;
import com.akto.threat.detection.config.kafka.KafkaConfig;
import com.akto.threat.detection.config.kafka.KafkaConsumerConfig;
import com.akto.threat.detection.config.kafka.KafkaProducerConfig;
import com.akto.kafka.KafkaConfig;
import com.akto.kafka.KafkaConsumerConfig;
import com.akto.kafka.KafkaProducerConfig;
import com.akto.threat.detection.constants.KafkaTopic;
import com.akto.threat.detection.session_factory.SessionFactoryUtils;
import com.akto.threat.detection.tasks.CleanupTask;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.akto.threat.detection.tasks;

import com.akto.kafka.KafkaConfig;
import com.akto.runtime.utils.Utils;
import com.akto.threat.detection.config.kafka.KafkaConfig;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.akto.threat.detection.tasks;

import com.akto.dto.type.URLMethods;
import com.akto.proto.threat_protection.message.malicious_event.v1.MaliciousEvent;
import com.akto.kafka.KafkaConfig;
import com.akto.proto.threat_protection.message.sample_request.v1.SampleMaliciousRequest;
import com.akto.threat.detection.config.kafka.KafkaConfig;
import com.akto.threat.detection.db.entity.MaliciousEventEntity;
import com.akto.threat.detection.dto.MessageEnvelope;
import com.google.protobuf.InvalidProtocolBufferException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.akto.threat.detection.tasks;

import com.akto.dao.context.Context;
import com.akto.kafka.KafkaConfig;
import com.akto.proto.threat_protection.message.malicious_event.v1.MaliciousEvent;
import com.akto.proto.threat_protection.message.sample_request.v1.SampleMaliciousRequest;
import com.akto.threat.detection.actor.SourceIPActorGenerator;
import com.akto.threat.detection.cache.RedisBackedCounterCache;
import com.akto.threat.detection.config.kafka.KafkaConfig;
import com.akto.threat.detection.constants.KafkaTopic;
import com.akto.dao.monitoring.FilterYamlTemplateDao;
import com.akto.data_actor.DataActor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.akto.threat.detection.tasks;

import com.akto.kafka.KafkaConfig;
import com.akto.proto.threat_protection.message.malicious_event.v1.MaliciousEvent;
import com.akto.proto.threat_protection.message.sample_request.v1.SampleMaliciousRequest;
import com.akto.proto.threat_protection.service.malicious_alert_service.v1.MaliciousEventServiceGrpc;
import com.akto.proto.threat_protection.service.malicious_alert_service.v1.RecordMaliciousEventRequest;
import com.akto.proto.threat_protection.service.malicious_alert_service.v1.RecordMaliciousEventResponse;
import com.akto.threat.detection.config.kafka.KafkaConfig;
import com.akto.threat.detection.db.entity.MaliciousEventEntity;
import com.akto.threat.detection.dto.MessageEnvelope;
import com.akto.threat.detection.grpc.AuthToken;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.akto.threat.detection.config.kafka;
package com.akto.kafka;

public class KafkaConfig {
private final String bootstrapServers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.akto.threat.detection.config.kafka;
package com.akto.kafka;

public class KafkaConsumerConfig {
private final int maxPollRecords;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.akto.threat.detection.config.kafka;
package com.akto.kafka;

public class KafkaProducerConfig {
private final int lingerMs;
Expand Down

0 comments on commit a6176d3

Please sign in to comment.