일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- schema registry
- scala
- enablekafkastreams
- kafkastream
- 플레이 프레임워크
- statestore
- springboot
- spring-cloud-stream
- reactive
- spring-kafka
- scala 2.10
- kafkastreams
- coursera
- kafka streams
- 한빛미디어
- gradle
- aws
- Logstash
- Spring
- Slick
- RabbitMQ
- spring-batch
- kafka interactive query
- Kafka
- Elk
- play framework
- avo
- 카프카
- confluent
- Elasticsearch
- Today
- Total
목록2018/03 (11)
b
https://spring.io/blog/2018/03/07/testing-auto-configurations-with-spring-boot-2-0 지지난주 spring.io 에 올라온 글이다. 스프링부트 2.0에 ApplicationContextRunner 가 추가 되었고 이에 대한 사용법을 설명하는 내용인데, 실제로 활용해보니 기존의 static class 로 Spring 설정을 slicing 하는 것보다 가독성도 좋고, 사용도 편하다. 1. SolMailAutoConfiguration 빈을 생성할때 JSR380에 의해 validate한지 확인하는 테스트new ApplicationContextRunner() .withConfiguration(of(SolMailAutoConfiguration.class..
Working Effectively with Unit Tests #1 https://leanpub.com/wewut 를 읽고 정리한 내용 첫번째 단락 Unit Testing, a First Example * Replace Loop with individual Test- https://github.com/bistros/wewut-code#replace-loop-with-individual-tests- 읽기 쉬운 테스트를 위한 첫 번째 단계는 반복 테스트를 각각의 테스트로 변경하는 것이다.ex) for-each를 돌면서 여러값을 테스트 하는 것을 제거한다 * Expect Literals- https://github.com/bistros/wewut-code#expect-literals그 다음 가독성을 높이는 ..
Should You Put Several Event Types in the Same Kafka Topic?링크 : https://www.confluent.io/blog/put-several-event-types-kafka-topic/ 에서 필요한 부분만 정리카프카를 쓸 때 가장 중요한 것 중 하나는 토픽을 어떻게 쓸 것인가이다. 만약 여러 이벤트 묶음이 있다면 한 토픽에 넣을 것인가, 여러 토픽에 넣을 것인가? 극단적으로 하나의 토픽에 넣는것은 좋은 생각이 아니다. 컨슈머가 관심있는 이벤트를 선택해서 소비할 수 있는 방법이 없기 때문이다. 반대로 너무 많은 것도 좋은 건 아니다.사실 성능관점에서 중요한것은 파티션의 갯수이다. 경험에 비추어 보면 레이턴시가 중요하다면 브로커 노드당 수백의 토픽-파티션을 가..
https://www.confluent.io/blog/event-sourcing-using-apache-kafka/ 를 읽고 대충 필요한 것만 적음.추가적으로 알게된 내용보다는 다시 한번 지식을 되새겨볼 수 있던 기회. Storing events in Kafka 첫 번째 문제는 이벤트를 어떻게 저장하는가이다. 3개의 방법으로 얘기할 수 있다.1. 모든 타입의 모든 이벤트를 하나의 토픽에 저장하는 방법 (물론 멀티 파티션)2. Topic-per-entity-type : entity별로 관련된 이벤트들을 분리된 토픽에 저장하는 방법 (예를 들어 user관련 토픽, product관련 토픽)3. topic-per-entity : 각각의 user, product 처럼 각 entity별로 별도의 토픽을 할당해서 저..
카프카의 Header 지원- 0.11 버전이후 user(custom) header를 지원하기 시작하였고 아래 위키와 이슈를 참고- https://cwiki.apache.org/confluence/display/KAFKA/KIP-82+-+Add+Record+Headers- https://issues.apache.org/jira/browse/KAFKA-4208 실제로 저장되는 형식과 구현체는 아래를 참고- https://kafka.apache.org/documentation/#record- https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/record/DefaultRecord.java#L175 Pro..
방법) KafkaStreams#close 호출로서 정상적인 종료가 가능하다고 한다. (참고 : https://kafka.apache.org/10/documentation/streams/developer-guide/write-streams )그럼 이 close를 어떻게 호출 해야하는지를 찾아보자. 1) spring-cloud-stream 를 사용할 경우- (나같은 경우에는 order-eda-notification prj)- general 한 방법으로 사용을 한다면 StreamsBuilderFactoryManager bean이 자동등록 되고 이 매니저 빈은 SmartLifecycle 를 상속받기 때문에 spring application이 종료 시그널을 받으면 stop을 시작하는 시작점이 된다. - 이 매니저..
KafkaListener annotation토픽의 메시지를 소비할 메소드에 붙이는 어노테이션이다. 이 어노테이션을 붙인다면, KafkaListenerContainerFactory에 의해서 MessageListenerContainer가 기동된다. 현재로서는 ConcurrentKafkaListenerContainerFactory 클래스만 존재 하니까, 기본적으로 KafkaListener을 붙인다는 것은 ConcurrentMessageListenerContainer 리스너 컨테이너를 사용한다는 의미이다.그리고 @ConditionalOnClass(EnableKafka.class) 에 의해서 KafkaAnnotationDrivenConfiguration 설정 클래스가 로드 되는대, 여기서 "kafkaListene..
MessageListenerContainer 인터페이스* spring-kakfa 에서 사용되는 최상단 '메시지 리스너 컨테이너'의 인터페이스 형태이다. 구현체는 Single-Thread 형태의 KafkaMessageListenerContainer 와 KafkaMessageListenerContainer 를 여러개 붙인 형태인 ConcurrentMessageListenerContainer 이렇게 2개가 기본 제공된다.* Message Listener 이므로 '메시지의 수신' 관점에서 볼 때 필요하다. Kafka Cluster 의 gateway를 담당하는 application 을 만들 때는 'producer' 쪽이 필요하다.* pause(), resume()을 인터페이스 레벨에서 가지고 있다. ㅁ Abstr..