Java
-
RabbitMQ DLX/DLQ 메세지 손실 방지MQ 2023. 7. 3. 11:24
RabbitMQ DLX/DLQ 메세지 손실 방지 이번 글에 주제는 RabbitMQ를 재시작 했을 때 DLX(Dead Letter Exchange)와 DLQ(Dead Letter Queue)의 메세지가 손실 되지 않는 구성 및 코드를 작성하는 방법에 대해서 쓰려고 합니다. 물론 DLX/DLQ에만 국한된 이야기가 아니고 Exchange/Queue에도 관련된 이야기 입니다. DLX/DLQ도 결국에는 Exchange이면서 Queue이기도 하기 때문입니다. 이와 관련해서 사용된 기술은 Spring AMQP 기준 입니다. 그렇지만 기술만 그러할 뿐 근본적인 내용은 RabbitMQ에 의존하기 때문에 다른 언어에서도 지원 되는 기술을 찾아 동일하게 적용할 수 있습니다. 방법 RabbitMQ 서버가 재시작 되었을 때 메..
-
[Part3] Java8 In action - Chapter11 - 1Java8 In Action 2022. 8. 9. 13:53
해당 내용은 Java8 In Action 책을 요약 및 정리한 내용입니다. 좀 더 자세히 알고 싶으신 분들은 책을 사서 읽어보심을 추천드립니다.! 11.1 Future Main package Part3.Chapter11.Chapter11_11_1; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.uti..
-
[Part3] Java8 In action - Chapter10 - 1Java8 In Action 2022. 8. 4. 10:00
해당 내용은 Java8 In Action 책을 요약 및 정리한 내용입니다. 좀 더 자세히 알고 싶으신 분들은 책을 사서 읽어보심을 추천드립니다.! 10.1 값이 없는 상황을 어떻게 처리할까 Entity Car.java package Part3.Chapter10.Chapter10_10_1.entity; public class Car { private Insurance insurance; public Insurance getInsurance() { return this.insurance; } } Insurance.java package Part3.Chapter10.Chapter10_10_1.entity; public class Insurance { private String name; public Strin..
-
[Part3] Java8 In action - Chapter8 - 1Java8 In Action 2022. 8. 3. 19:24
해당 내용은 Java8 In Action 책을 요약 및 정리한 내용입니다. 좀 더 자세히 알고 싶으신 분들은 책을 사서 읽어보심을 추천드립니다.! 8.1 가독성과 유연성을 개선하는 리팩토링 Entity Dish.java package Part3.Chapter8.Chapter8_8_1.entity; public class Dish { private final String name; private final boolean vegetarian; private final int calories; private Type type; public Dish(String name, boolean vegetarian, int calories, Type type) { this.name = name; this.vegetari..
-
[Part2] Java8 In action - Chapter7 - 1Java8 In Action 2022. 8. 2. 08:58
해당 내용은 Java8 In Action 책을 요약 및 정리한 내용입니다. 좀 더 자세히 알고 싶으신 분들은 책을 사서 읽어보심을 추천드립니다.! 7.1 병렬 스트림 Main package Part2.Chapter7.Chapter7_7_1; import java.util.function.Function; import java.util.stream.LongStream; import java.util.stream.Stream; /* * 7.1 병렬 스트림 * * 컬렉션에서 parallelStream을 호출하면 병렬 스트림(parallel stream)이 생성된다. * 병렬 스트림이란 각각의 스레드에서 처리할 수 있도록 스트림 요소를 여러 청크로 분할한 스트림이다. * 따라서 병렬 스트림을 이용하면 모든 멀티..
-
[Part2] Java8 In action - Chapter6 - 2Java8 In Action 2022. 8. 1. 17:46
해당 내용은 Java8 In Action 책을 요약 및 정리한 내용입니다. 좀 더 자세히 알고 싶으신 분들은 책을 사서 읽어보심을 추천드립니다.! 6.4 분할 Entity Dish.java package Part2.Chapter6.Chapter6_6_4.entity; public class Dish { private final String name; private final boolean vegetarian; private final int calories; private Type type; public Dish(String name, boolean vegetarian, int calories, Type type) { this.name = name; this.vegetarian = vegetarian; ..
-
[Part2] Java8 In action - Chapter6 - 1Java8 In Action 2022. 8. 1. 17:43
해당 내용은 Java8 In Action 책을 요약 및 정리한 내용입니다. 좀 더 자세히 알고 싶으신 분들은 책을 사서 읽어보심을 추천드립니다.! 6.1 컬렉터란 무엇인가 Entity Dish.java package Part2.Chapter6.Chapter6_6_1.entity; public class Dish { private final String name; private final boolean vegetarian; private final int calories; private Type type; public Dish(String name, boolean vegetarian, int calories, Type type) { this.name = name; this.vegetarian = veget..
-
[Part2] Java8 In action - Chapter5 - 3Java8 In Action 2022. 7. 29. 13:37
해당 내용은 Java8 In Action 책을 요약 및 정리한 내용입니다. 좀 더 자세히 알고 싶으신 분들은 책을 사서 읽어보심을 추천드립니다.! 5.5 실전 연습 Entity Trader.java package Part2.Chapter5.Chapter5_5_5.entity; public class Trader { private final String name; private final String city; public Trader(String name, String city) { this.name = name; this.city = city; } public String getName() { return this.name; } public String getCity() { return this.cit..