I'm just getting into reactive programming with Reactor 3 in Java. I want to implement a client for an http service using reactor-netty. So far, I have very basic http requests being sent perfectly. However, the service expects clients to abide by ratelimits (informing the client with traditional X-RateLimit-Limit, X-RateLimit-Remaining, etc. headers).
I want to automatically retry requests when they are ratelimited, but I'm not really sure what would be the most "idiomatic" or efficient way to do this with reactive streams. I can't simply sleep in my stream threads so what should I be looking at instead? From what I have read so far, I believe I want to look into utilizing backpressure for this task, but I'm not sure where to get started.
Sorry for the potentially broad question.