diff --git a/src/main/java/com/example/waggle/global/config/kafka/KafkaConsumerConfig.java b/src/main/java/com/example/waggle/global/config/kafka/KafkaConsumerConfig.java index 4bcd3eac..4873c597 100644 --- a/src/main/java/com/example/waggle/global/config/kafka/KafkaConsumerConfig.java +++ b/src/main/java/com/example/waggle/global/config/kafka/KafkaConsumerConfig.java @@ -12,6 +12,7 @@ import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory; import org.springframework.kafka.core.ConsumerFactory; import org.springframework.kafka.core.DefaultKafkaConsumerFactory; +import org.springframework.kafka.listener.ContainerProperties; import org.springframework.kafka.support.serializer.JsonDeserializer; import java.util.Map; @@ -27,6 +28,8 @@ public class KafkaConsumerConfig { ConcurrentKafkaListenerContainerFactory kafkaListenerContainerFactory() { ConcurrentKafkaListenerContainerFactory factory = new ConcurrentKafkaListenerContainerFactory<>(); factory.setConsumerFactory(consumerFactory()); + factory.setConcurrency(6); // 파티션 개수에 맞춰 스레드 설정 + factory.getContainerProperties().setAckMode(ContainerProperties.AckMode.MANUAL); // 수동 커밋 모드 return factory; } diff --git a/src/main/java/com/example/waggle/security/jwt/service/TokenServiceImpl.java b/src/main/java/com/example/waggle/security/jwt/service/TokenServiceImpl.java index cc85b948..126ac0ba 100644 --- a/src/main/java/com/example/waggle/security/jwt/service/TokenServiceImpl.java +++ b/src/main/java/com/example/waggle/security/jwt/service/TokenServiceImpl.java @@ -133,7 +133,7 @@ public JwtToken generateToken(Authentication authentication) { .grantType("Bearer") .accessToken(accessToken) .refreshToken(refreshToken) - .build(); + .build();User } @Override