-
Notifications
You must be signed in to change notification settings - Fork 0
feat/117 :: Release 릴리즈 서비스 구현 #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lian2945
wants to merge
84
commits into
main
Choose a base branch
from
feat/117
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 29 commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
35db47e
feat/116 :: Order 도메인 Aggregate, VO, 이벤트, 예외, 글로벌 예외 계층
lian2945 f79c8da
feat/116 :: Order UseCase, Port, Service, DTO 구현
lian2945 fb32475
feat/116 :: Order 어댑터 (Web/Kafka/gRPC/Persistence/Security/Scheduler)
lian2945 c43e703
feat/116 :: Order application-*.yml, Dockerfile, build.gradle 설정
lian2945 616e03c
feat/117 :: Release 도메인 Aggregate, VO, 예외, 글로벌 예외 계층
lian2945 87cf732
feat/117 :: Release UseCase, Port, Service, DTO 구현
lian2945 56edccf
feat/117 :: Release 어댑터 (Web/gRPC/Persistence/Security/Scheduler)
lian2945 0c59c17
feat/117 :: Release application-*.yml, Dockerfile, build.gradle 설정
lian2945 503d3c3
feat/116 :: SonarCloud 경고 해결 (빈 테스트 메서드 주석, Dockerfile non-root 유저)
lian2945 f334e59
feat/117 :: SonarCloud 경고 해결 (빈 테스트 메서드 주석, Dockerfile non-root 유저)
lian2945 6e3c690
feat/117 :: release application-dev.yml trusted.ips 수정
lian2945 59650b6
feat/116 :: order application-dev.yml trusted.ips 수정
lian2945 6d817f6
feat/117 :: release Dockerfile 경로 및 줄바꿈 오류 수정
lian2945 7452d15
feat/116 :: order Dockerfile 경로 및 줄바꿈 오류 수정
lian2945 831584a
feat/117 :: release application-prod.yml 추가
lian2945 e92585c
feat/116 :: order application-prod.yml 수정 (server.port/TRUSTED_IPS 제거…
lian2945 6f90fdb
feat/116 :: subscribe/creator application-dev/prod.yml server.port 제거
lian2945 23ac3b3
feat/117 :: subscribe/creator application-dev/prod.yml server.port 제거
lian2945 613a3e6
fix(grpc): GrpcAdapter withDeadlineAfter(2s) 설정 추가
lian2945 b68418b
fix(grpc): GrpcAdapter withDeadlineAfter(2s) 설정 추가
lian2945 613fefc
fix(inbox): @DltHandler 추가로 DLT 전환 시 Inbox DEAD_LETTERED 상태 추적
lian2945 45d146b
fix(inbox): @DltHandler 추가로 DLT 전환 시 Inbox DEAD_LETTERED 상태 추적
lian2945 fff6513
fix(user/kafka): 전체 리스너에 @RetryableTopic + @DltHandler 추가
lian2945 1ec5ebc
fix(user/kafka): 전체 리스너에 @RetryableTopic + @DltHandler 추가
lian2945 12d1716
refactor(inbox): InboxEvent에 occurredAt() 추가, IdempotentAspect 리플렉션 제거
lian2945 af1f284
refactor(inbox): InboxEvent에 occurredAt() 추가, IdempotentAspect 리플렉션 제거
lian2945 a35f211
refactor(inbox): InboxEvent occurredAt() 계약 추가, IdempotentAspect 리플렉션 제거
lian2945 b5ba18e
fix(inbox): InboxProperties 누락 및 inbox 설정 추가
lian2945 481ceb4
fix(inbox): InboxEntity에 occurredAt 필드 추가
lian2945 7bfbddd
fix(inbox): InboxEntity에 occurredAt 필드 추가
lian2945 947d50a
ci: trigger build
lian2945 1531aa1
ci: trigger build
lian2945 92bede8
fix(inbox): InboxProperties 누락 및 inbox 설정 추가
lian2945 08ae806
fix(inbox): SubscribeInboxStatus/Repository, GeneralGoodsInboxStatus/…
lian2945 2b276d1
fix(inbox): SubscribeInboxStatus/Repository, GeneralGoodsInboxStatus/…
lian2945 4109f1f
fix(creator): CreatorDomainEvent → CreatorOutbox 리네이밍 및 테이블명 creator_…
lian2945 320c666
fix(creator): CreatorDomainEvent → CreatorOutbox 리네이밍 및 테이블명 creator_…
lian2945 df2ab7a
fix(creator): 서비스 레이어 CreatorDomainEventRepositoryPort → CreatorOutbo…
lian2945 04a0457
fix(creator): 서비스 레이어 CreatorDomainEventRepositoryPort → CreatorOutbo…
lian2945 dada21f
fix(creator): 도메인 이벤트 occurredAt 필드 추가 및 Creator.createBuilder() 복구
lian2945 7ca20c6
fix(creator): 도메인 이벤트 occurredAt 필드 추가 및 Creator.createBuilder() 복구
lian2945 3e82824
fix(kafka): creator/subscribe retry 설정 spring.kafka.retry.topic 형식으로 수정
lian2945 9d1b838
fix(kafka): creator/subscribe retry 설정 spring.kafka.retry.topic 형식으로 수정
lian2945 dbafa83
fix(creator): refactor/115 기준으로 creator 서비스 전체 동기화
lian2945 fbbf849
fix(creator): refactor/115 기준으로 creator 서비스 전체 동기화
lian2945 be3e263
fix(creator): creator.proto에 GetCreatorIdByUserId rpc 추가
lian2945 ae99e01
fix(creator): creator.proto에 GetCreatorIdByUserId rpc 추가
lian2945 1fea8c9
fix(docker): Dockerfile appuser 보안 패턴 및 JAR_FILE 경로 통일
lian2945 19f1287
fix(docker): Dockerfile appuser 보안 패턴 및 JAR_FILE 경로 통일
lian2945 525a95a
fix(inbox): 만료 메시지 조용한 폐기 → DEAD_LETTERED 영속화로 변경
lian2945 24d2402
fix(inbox): 만료 메시지 조용한 폐기 → DEAD_LETTERED 영속화로 변경
lian2945 95d0e35
fix(inbox): 만료 메시지 조용한 폐기 → DEAD_LETTERED 영속화로 변경
lian2945 c15bac0
fix(inbox): 만료 메시지 조용한 폐기 → DEAD_LETTERED 영속화로 변경
lian2945 ef6480a
fix(inbox): 만료 메시지 조용한 폐기 → DEAD_LETTERED 영속화로 변경
lian2945 36b339a
feat(order): Resilience4j CircuitBreaker/TimeLimiter 설정 추가 (releaseSe…
lian2945 de9c5f8
feat(order): Resilience4j CircuitBreaker/TimeLimiter 설정 추가 (releaseSe…
lian2945 26bc10a
refactor(order): @Transactional 범위 내 gRPC 호출 제거
lian2945 aeef1e8
feat(release): Kafka consumer로 soldQuantity 비동기 처리 (Inbox 패턴)
lian2945 62aaa64
refactor(order): AutoConfirm 스케줄러 청크 처리 + 분산 락 + 설정 외부화
lian2945 413f8aa
refactor(order): AutoConfirm 스케줄러 청크 처리 + 분산 락 + 설정 외부화 (누락 파일 추가)
lian2945 7c6f82a
fix(kafka): IdempotentAspect catch(Throwable) 수정 및 @RetryableTopic ex…
lian2945 2bf145b
Merge branch 'feat/116' into feat/117
lian2945 5bb879c
fix(order): ConfirmOrderLineService 이벤트 중복 발행 방지 가드 추가
lian2945 362bf6e
Merge branch 'feat/116' into feat/117
lian2945 0d66382
fix(order): confirmOrderLine 도메인에서 PREPARING 상태만 허용하도록 수정
lian2945 0394205
Merge branch 'feat/116' into feat/117
lian2945 a72677b
fix(kafka): @RetryableTopic에 dltStrategy, dltTopicSuffix 명시
lian2945 172f5e2
Merge branch 'feat/116' into feat/117
lian2945 e7bf5c8
fix(kafka): IdempotentAspect catch(Exception) → catch(Throwable) 컴파일 …
lian2945 1b1d96c
Merge branch 'feat/116' into feat/117
lian2945 b0327b5
Merge remote-tracking branch 'origin/main' into feat/117
lian2945 14a67c3
fix(grpc): proto Release 메시지 누락 필드 추가 및 created_at 매핑 오류 수정
lian2945 418df4d
fix(scheduler): Redisson 분산 락 + 청크 처리로 AutoStartSale 다중 인스턴스 충돌 해소
lian2945 4b9b8fa
chore(deps): redisson-spring-boot-starter 3.45.1 → 3.50.0
lian2945 6cdb350
refactor(grpc): IncreaseSoldQuantity gRPC 엔드포인트 제거 — Kafka Inbox 단일 경…
lian2945 53f1aff
refactor(release): gRPC 호출을 트랜잭션 밖으로 분리
lian2945 9a1f7d4
fix(release): PR 리뷰 코멘트 반영 — isOnSale 도메인 위임, Validator 개선, gRPC 채널 재사용
lian2945 3bf4654
refactor(validation): ZonedDateTime 제거 — epochSecond % 600 으로 단순화
lian2945 4017fd3
fix(general-goods): CreatorGrpcAdapter — grpcChannelFactory 직접 호출 제거,…
lian2945 0722dca
fix(order): shedlock-provider-redisson → shedlock-provider-redis-spri…
lian2945 82f2719
fix(docker): COPY --chown으로 chown RUN 레이어 제거 — I/O 에러 방지
lian2945 ff85478
feat(user): GET /user/me 엔드포인트 추가
lian2945 6807066
[feat/117] :: order 서비스 Debezium CDC 역직렬화 오류 수정
lian2945 4ab4ca7
[feat/117] :: order outbox payload에 event_id 포함
lian2945 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,9 @@ | ||
| FROM mcr.microsoft.com/openjdk/jdk:21-ubuntu | ||
| ARG JAR_FILE=build/libs/*.jar | ||
| RUN groupadd -r appuser && useradd -r -g appuser appuser | ||
| WORKDIR /app | ||
| COPY ${JAR_FILE} app.jar | ||
| RUN chown -R appuser:appuser /app | ||
| USER appuser | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["java", "-jar", "app.jar"] | ||
| ENTRYPOINT ["java", "-jar", "app.jar"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
services/auth/src/main/java/kr/magicbox/auth/adapter/in/kafka/event/InboxEvent.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| package kr.magicbox.auth.adapter.in.kafka.event; | ||
|
|
||
| import java.time.Instant; | ||
|
|
||
| public interface InboxEvent { | ||
| Long eventId(); | ||
| Instant occurredAt(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...ices/auth/src/main/java/kr/magicbox/auth/adapter/in/kafka/properties/InboxProperties.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package kr.magicbox.auth.adapter.in.kafka.properties; | ||
|
|
||
| import lombok.Getter; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
|
||
| @Getter | ||
| @RequiredArgsConstructor | ||
| @ConfigurationProperties(prefix = "inbox") | ||
| public class InboxProperties { | ||
| private final long maxEventAgeMinutes; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,9 @@ | ||
| FROM mcr.microsoft.com/openjdk/jdk:21-ubuntu | ||
| ARG JAR_FILE=build/libs/*.jar | ||
| RUN groupadd -r appuser && useradd -r -g appuser appuser | ||
| WORKDIR /app | ||
| COPY ${JAR_FILE} app.jar | ||
| RUN chown -R appuser:appuser /app | ||
| USER appuser | ||
| EXPOSE 8080 | ||
| ENTRYPOINT ["java", "-jar", "app.jar"] | ||
| ENTRYPOINT ["java", "-jar", "app.jar"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 11 additions & 33 deletions
44
services/creator/src/main/java/kr/magicbox/creator/adapter/in/kafka/KafkaConfiguration.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,44 +1,22 @@ | ||
| package kr.magicbox.creator.adapter.in.kafka; | ||
|
|
||
| import kr.magicbox.creator.adapter.in.kafka.properties.KafkaRetryProperties; | ||
| import lombok.RequiredArgsConstructor; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.apache.kafka.clients.consumer.ConsumerRecord; | ||
| import org.apache.kafka.common.TopicPartition; | ||
| import kr.magicbox.creator.adapter.in.kafka.properties.InboxProperties; | ||
| import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||
| import org.springframework.context.annotation.Bean; | ||
| import org.springframework.context.annotation.Configuration; | ||
| import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory; | ||
| import org.springframework.kafka.core.ConsumerFactory; | ||
| import org.springframework.kafka.core.KafkaTemplate; | ||
| import org.springframework.kafka.listener.CommonErrorHandler; | ||
| import org.springframework.kafka.listener.DeadLetterPublishingRecoverer; | ||
| import org.springframework.kafka.listener.DefaultErrorHandler; | ||
| import org.springframework.util.backoff.FixedBackOff; | ||
| import org.springframework.kafka.annotation.EnableKafkaRetryTopic; | ||
| import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; | ||
|
|
||
| @Slf4j | ||
| @EnableKafkaRetryTopic | ||
| @Configuration | ||
| @RequiredArgsConstructor | ||
| @EnableConfigurationProperties(InboxProperties.class) | ||
| public class KafkaConfiguration { | ||
| private final KafkaRetryProperties kafkaRetryProperties; | ||
|
|
||
| @Bean | ||
| public CommonErrorHandler errorHandler(KafkaTemplate<?, ?> kafkaTemplate) { | ||
| DeadLetterPublishingRecoverer recoverer = new DeadLetterPublishingRecoverer(kafkaTemplate, | ||
| (ConsumerRecord<?, ?> failedRecord, Exception ex) -> { | ||
| String topic = failedRecord.topic() + "-dlt"; | ||
| log.error("[DLT] 메시지 처리 실패, DLT 전송합니다. topic={}, offset={}, exception={}", failedRecord.topic(), failedRecord.offset(), ex.getMessage()); | ||
| return new TopicPartition(topic, failedRecord.partition()); | ||
| }); | ||
| return new DefaultErrorHandler(recoverer, new FixedBackOff(kafkaRetryProperties.getIntervalMs(), kafkaRetryProperties.getMaxAttempts())); | ||
| } | ||
|
|
||
| @Bean | ||
| public ConcurrentKafkaListenerContainerFactory<?, ?> kafkaListenerContainerFactory( | ||
| ConsumerFactory<Object, Object> consumerFactory, | ||
| CommonErrorHandler errorHandler) { | ||
| ConcurrentKafkaListenerContainerFactory<Object, Object> factory = new ConcurrentKafkaListenerContainerFactory<>(); | ||
| factory.setConsumerFactory(consumerFactory); | ||
| factory.setCommonErrorHandler(errorHandler); | ||
| return factory; | ||
| public ThreadPoolTaskScheduler taskScheduler() { | ||
| ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler(); | ||
| scheduler.setPoolSize(1); | ||
| scheduler.setThreadNamePrefix("kafka-retry-"); | ||
| return scheduler; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Major] 만료 메시지 DEAD_LETTERED 저장 시
existsByEventId중복 체크가 누락되어 있습니다.동일
eventId가 (정상 처리된 후) 재전달되어 만료 판정을 받게 되면, 위 분기는 정상 처리 분기와 달리 중복 체크 없이 곧바로save를 호출하므로event_idUNIQUE 제약 위반이 발생합니다. 또한 같은 메시지가 retry로 여러 번 들어와 모두 만료 처리되면 동일하게 위반됩니다.제안:
creator 측
IdempotentAspect도 동일 구조이므로 같이 보완해 주세요.