Controlling request demand with subscriber #1058
-
I'm trying to use a subscriber in Mutiny that allows me to control the request demand from within my reactive pipeline, but it seems like there aren't any base subscribers in the library to do this besides My use case is that I have an abstraction with a So, I guess my overall question would be what subscriber can I instantiate that allows me to control the request demand? And then request more items from within my pipeline based on some conditions? Would |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can easily create your own subscriber implementation.
You might look at an example like https://github.com/smallrye/smallrye-mutiny-zero/blob/main/mutiny-zero-vertx-publishers/src/test/java/docsamples/UrbanObservatoryHttpClient.java |
Beta Was this translation helpful? Give feedback.
You can easily create your own subscriber implementation.
I do not recomment using
AssertSubscriber
outside tests.onSubscribe
will be called when a subscription is given to you, and from here you will be able to request elements when it's appropriate to do so.You might look at an example like https://github.com/smallrye/smallrye-mutiny-zero/blob/main/mutiny-zero-vertx-publishers/src/test/java/docsamples/UrbanObservatoryHttpClient.java