We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Alexander Glukhovtsev • 1 year ago

For the last part ( Blocking to Reactive )
one can use almost exact snippets from here

Christian Meyer • 4 months ago

Thanks for putting this together. Would definitely be nice to have some hints or solutions since it's easy to get stuck for a little while on small stuff. But overall can appreciate the time taken to provide this.

Mashrur Mia • 1 year ago

typo "in fact it can be though -> thought of as both a Subscriber to the operator upstream and a Publisher for downstream"

siddharth • 7 months ago

What hapen when the we subscriber request limited amount of data from publisher . for ex- request 10
then again subscriber requested 20 data form publisher..what will happen .
and mind it subscriber subscribe to publisher withe the limited request not with the Long.Max_Value .as per doc in the scenario
.

sbilello • 1 week ago

When you complete all of them are you going to receive a badge or achievement?

Aashish • 1 year ago

Is it a good idea to have pubisher and subscriber in the same app / Microservice and use Reactive-RabbitMq as reactive stream?

Mahantesh Ambali • 1 year ago

What is the answer for the last one. ? Unable to find. expect3600Elements

Raúl Montemayor Peralta • 9 months ago

Flux<long> counter() {
Duration period = Duration.of(100L, ChronoUnit.MILLIS);
return Flux.interval(period).take(10L);
}

kojot • 3 weeks ago


void expect3600Elements(Supplier<flux<long>> supplier) {
final Duration duration = StepVerifier
.withVirtualTime(() -> Mono.delay(Duration.ofHours(1)))
.expectSubscription()
.expectNoEvent(Duration.ofSeconds(1))
.thenAwait(Duration.ofHours(1))
.expectNextCount(1)
.expectComplete()
.verify();
System.out.println(duration.toMillis());
}

This works to me, but I don't know why. I think it should by `.expectNextCount(3600)` or something like that.

Magdalena • 4 months ago

Flux<long> counter() {
return Flux.interval(Duration.ofMillis(100)).take(10);
}

Ankesh Kapil • 1 year ago

Flux<long> counter() {

return Flux.generate(() -> 0l, (state, sink) -> {
sink.next(state++);
if (state == 10l)
sink.complete();
return state;
});
}

Alexander Glukhovtsev • 1 year ago

It is nice that
one can add


import static org.assertj.core.api.Assertions.*;


or


import static org.junit.Assert.*;


to this snippet
and this will work just fine .

[CG]OlogN • 1 year ago

Hi Alexander, do you think you can send your pull requests on the GitHub project? https://github.com/reactor/...

Alexander Glukhovtsev • 1 year ago

Hi,
I don't know .
Sometimes incomplete or slightly incorrect information
pushes your to discover what is actually goes on .
So, in this particular case it was beneficial, for me .
And I'm inclined to leave this part of the tutorial as it is
( more challenging ) .

Alexander Glukhovtsev • 1 year ago

Also clever typo in withVirtualTime()method's name example,
I spend almost half an hour, reading error messages,
until I figured that out .
And it was a surprise, for me,
that java.util.function.Supplier is lambda itself .
Namely,
the method signature (void|:Unit|side effects) ->|=>|to Flux<T>
is equivalent to java.util.function.Supplier<Flux<T>>