Skip to content

Commit 42b989b

Browse files
committed
YEL-88 [chore] 테스트를 위한 메세지큐 설정
1 parent 3d1a319 commit 42b989b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/main/java/com/yello/server/infrastructure/rabbitmq/service/ConsumerRabbitmqService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ public void consumeVoteAvailableNotification(final Message message) throws IOExc
3131
);
3232

3333
try {
34-
// boolean exists = cooldownRepository.existsByUserId(voteAvailableQueueResponse.receiverId());
35-
// if (exists) {
3634
log.info("[rabbitmq] sending notification in consumer");
3735
notificationService.sendVoteAvailableNotification(voteAvailableQueueResponse.receiverId());
38-
// }
3936
} catch (Exception exception) {
4037
log.error(exception.getMessage());
4138
}
4239
log.info("[rabbitmq] consumed message in queue");
4340
}
4441
}
42+
// boolean exists = cooldownRepository.existsByUserId(voteAvailableQueueResponse.receiverId());
43+
// if (exists) {
44+
// }

src/main/java/com/yello/server/infrastructure/rabbitmq/service/ProducerRabbitmqService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ public class ProducerRabbitmqService implements ProducerService {
1919
@Override
2020
public void produceVoteAvailableNotification(Cooldown cooldown) {
2121
LocalDateTime end = cooldown.getCreatedAt().plusMinutes(2);
22+
23+
log.info("[rabbitmq] end = " + end.toString());
2224
final long expiration = Duration.between(cooldown.getCreatedAt(), end).toMillis();
25+
log.info("[rabbitmq] expiration sec = " + Duration.between(cooldown.getCreatedAt(), end).getSeconds());
26+
log.info("[rabbitmq] expiration = " + expiration);
2327

2428
VoteAvailableQueueResponse voteAvailableQueueResponse = VoteAvailableQueueResponse.builder()
2529
.receiverId(cooldown.getUser().getId())

0 commit comments

Comments
 (0)