Observable와 MaybeSource는 RxJava에서 사용되는 비동기 스트림 타입이다. 1. Observable (from io.reactivex.rxjava3.core.Observable)정의: 0개 이상의 데이터를 순차적으로 발행하는 push 기반의 스트림 타입이다.특징다수의 아이템을 발행할 수 있다 (0개 ~ 무한 개).onNext가 여러 번 호출될 수 있다.끝났음을 알릴 땐 onComplete() 호출.에러가 발생하면 onError()를 호출하며 스트림 종료.2. MaybeSource (from io.reactivex.rxjava3.core.MaybeSource)정의: 0개 또는 1개의 값만 발행할 수 있는 타입.특징onSuccess(T) → 1개의 아이템을 정상적으로 발행.onComple..
https://blog.postman.com/what-are-http-methods/ HTTP methods are used to indicate the action an API client would like to perform on a given resource. Each HTTP method maps to a specific operation, such as creating, reading, updating, or deleting a resource, and an HTTP method must be included with every request to a REST API.Here, we’ll give a high-level overview of HTTP and explain how it is re..
The choice between WebClient.builder() and WebClient.create() depends on the level of customization required for the WebClient instance. WebClient.create():This static factory method provides a quick way to create a WebClient instance with default settings. It can also accept a base URL as an argument, simplifying the creation of clients for a specific endpoint. Use this when minimal configurati..
Reactor(Mono, Flux)와 코루틴... 도대체 무슨 사이인데Mono와 Flux는 Reactor에서 쓰이는 타입이다.Spring webFlux에서 사용하는 것이 Reactor이기 때문에, webFlux에서는 주로 Mono나 Flux를 쓴다. 근데 우리 프로젝트는 코루틴을 쓴단 말이지. (코드에 suspend가 있으면 당신은 코루틴을 쓰고 있는 것이다) 그러면 코루틴은 뭔데.코루틴도 비동기 처리에 쓰인다...그럼 둘의 다른 점은 뭔데... 항목 Kotlin Coroutines Reactor (Mono/Flux) 핵심 개념suspend를 통한 일시 정지비동기 스트림코드 스타일명령형 (imperative)선언형 (declarative)철학동기처럼 보이는 비동기데이터 흐름 기반 처리설계 목표간결..
exchange.request.body.map { dataBuffer -> ... } exchange.request.body의 타입은:Flux즉, DataBuffer들을 비동기적으로 흘려보내는 스트림이다.map { dataBuffer -> ... }에서 dataBuffer는 Flux가 하나씩 방출하는 요소(DataBuffer)다.그럼 왜 dataBuffer가 사용 가능한가?Flux는 코틀린에서 말하면 (List나 Sequence와 비슷하게)T 타입의 값들을 하나씩 처리할 수 있는 구조exchange.request.body가 Flux이므로.map { dataBuffer -> ... }는 그 안의 DataBuffer를 하나씩 꺼내서 처리하겠다는 의미dataBuffer는 DataBuffer 타입 하나의 인스턴..