The documentation for concatMapEager states:
@param prefetch hints about the number of expected source sequence values
Which leads me to assume that the following code should work:
Observable.fromIterable(someCollection)
.concatMapEager(this::performTask, 5, someCollection.size())
but it will fail if the collection is empty. Either the documentation should be updated to reflect that 0 is not a valid value or it should accept 0 (and perhaps set it to a default value internally).