Skip to content

2.1.3 Observable#concatMapEager queue size issue #5608

@Aschraf

Description

@Aschraf

Hello,

I've got some issues with ConcatMapEager prefetch value.

It seems that concatMapEager stops before the end of the Observable.

Here is a small example showing the issue :

Observable.range(1, 100000)
        .buffer(10)
        .concatMapEager(value -> Observable.just(value)
                .subscribeOn(Schedulers.io())
                .doOnNext(it -> Thread.sleep(ThreadLocalRandom.current().nextLong(10, 100))),
            6, 4)
        .blockingSubscribe(it -> System.out.println("Received : " + it));

This small code is supposed to write list of ints till 100000. It stops before finishing.

The code doesn't work for the default ConcatMapEager function either (prefetch = 128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions